HELP: Drag & Drop


Apr 27, 2005
Programming Experience

Currently i'm working on my own little program called the network map designer. I managed to do the drag and drop for the first label i added, but when i add a second label (drag and drop still works) the first label is stuck and it is not able to drag and drop anymore. My aim is: regardless of the number of labels i added, all of them should be able to drag and drop to move around the form.

I've attached my uncompleted program to give you a clearer picutre.

I need help solving this problem. Greatly appreciated, thanks in advance.

PS: Need to see my codes, PM me


    6.2 KB · Views: 35
i can see the problem you're talking about, but without some code i dont know how to help ya right off hand
none that i can think of right off hand, now that my finals are taken (yea... college) i might have some time here to look into it further
i've been playing with this for the better part of 2 hours now and i know what i want it to do but i dont know why it's not working

what i want it to do is in the form's mousedown event get the label and store the reference in the ctrlControl variable so that in the form's mousemove event the label will move with the mouse here's what i got, if anyone else can help that'd be much appreciated i'll start researching drag&drop stuff tomarrow (time permitting)
Hmm... the one u attached doesn't seems to be able to move the label about, and it's like totally different from mine :p , but still nvm at least u tried :D thanks~! I still working on it for quite a few days now lol still can't get it...

Is it possible to click and drag from TreeView to form/panel? How can i do it?
Last edited:
awsome, how'd you get it working out of curiosity?

and my approach was:
since the labels were being added to the form in code i'd have to use the form's mousedown/mousemove events to "grab" any control that's at that spot, but as you saw it wasnt working