开发者

Winforms drag and drop labels in the form

开发者 https://www.devze.com 2023-03-06 13:48 出处:网络
I have few lables in windows form. I want let user can drag and drop anywhere in the form. So that I can store their position in registry or database to restore them next time.

I have few lables in windows form. I want let user can drag and drop anywhere in the form. So that I can store their position in registry or database to restore them next time. I read the question I need a drag and drop control for C# winforms

But it didnt help me properly when I used DoDragDrop method on mousedown of the labels and OnDragOver event of the form.

Edit

To store the postion and restore the position is not I am looking here, Only the simple code how to drag/drop labels in winforms without using libraries or third party开发者_如何学运维 controls.


Hope this might help: http://www.java2s.com/Code/CSharp/GUI-Windows-Form/Draganddropimagetoanotherwindow.htm

Although this is for Image but I hope the same can be done for labels too.

:)

0

精彩评论

暂无评论...
验证码 换一张
取 消