Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm writing a windows form application that has a panel with some
labels in it.
I need to let the user move these labels with drag and drop inside the
panel. How can I do it?
Posted

1 solution

Use the MouseDown, MouseMove and MouseUp event handlers.
For more details read this article: Move controls on a form at runtime[^]
 
Share this answer
 
v2
Comments
Nuri Ismail 11-Mar-11 5:44am    
Excellent link! My 5.
Sergey Alexandrovich Kryukov 11-Mar-11 20:51pm    
Very good simple article referenced, my 5.
I especially like using anonymous delegates instead that no-good auto-generated non-anonymous way.
--SA
Dima Popov 12-Mar-11 5:40am    
Thanks :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900