반응형

개발 114

[이미지] C# Picture 박스에서 다른 Picture 박스로 이미지 끌어다 놓기

private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { var img = pictureBox1.Image; if (img == null) return; if (DoDragDrop(img, DragDropEffects.Move) == DragDropEffects.Move) { pictureBox1.Image = null; } } public Form1() { InitializeComponent(); pictureBox1.MouseDown += pictureBox1_MouseDown; pictureBox2.AllowDrop = true; pictureBox2.DragEnter += pictureBox2_DragEnter; pictureBo..

개발/C# 2018.02.13

[이미지] C# Picturebox 내에서 이미지 움직이기

picture 박스보다 큰 이미지를 Picture 박스에 이미지를 불러온뒤 움직이기 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms; namespace MoveImageOnPictrueBox{ public partial class Form1 : Form { private bool IsClicked = false; private Bitmap bm; private Point recLoc; pri..

개발/C# 2018.02.07

[이미지] C# 이미지위에 다른이미지 올려 마우스로 이동하기

Let the user drag an image with transparent pixels over a background image in C#Posted on September 25, 2014 by Rod StephensThis example shows how you can let the user drag an image on a PictureBox. The PictureBox‘s Image property is set to a background image. The user can press the mouse down on any of the image’s non-transparent pixels to drag the image.When it starts, the program uses the fol..

개발/C# 2018.02.07

[이미지] C# PictureBox 움직이기

PictureBOX를 마우스를 이용해서 이리저리 폼 위에서 옮기기 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms; namespace MoveinPictureBox{ public partial class Form1 : Form { Boolean isPositionCurseurImageSet = false; Point positionCurseurImage = new..

개발/C# 2018.02.07
반응형