Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I want a user to be able to drag a Control while showing it. I can't seem to find a way to convert its appearance to an image (in order to convert that image into an icon in order to have that as the dragging icon).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
275 views
Welcome To Ask or Share your Answers For Others

1 Answer

If I understand correctly, you want to draw the control to an image? Use Control.DrawToBitmap:

Bitmap b = new Bitmap(myControl.Width, myControl.Height);
myControl.DrawToBitmap(b, new Rectangle(0, 0, b.Width, b.Height));

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...