Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Moving objects on a form with the mouse (http://www.go4expert.com/forums/moving-objects-form-mouse-t998/)

djvargas 12Jul2006 04:12

Moving objects on a form with the mouse
 
Hi

I am a new member to this forum, so please forgive/correct me if I am posting incorrectly.

Can anyone help me with a way to move an object on the form (when compiling) by using the mouse? More specifically - I want to find a way to pick up a picture box via left-mouse click and drag it to any position on the form. Once I release left-mouse, the picture box will remain in that position. Any ideas?

I would like to either get the picture to move from point A to B in either of these manners:

1. Pick up and drag picture box
2. Click picture box, then click on form location (unused form space, not on top of another object)

Thank you for any suggestions :)

shabbir 14Jul2006 10:22

Re: Moving objects on a form with the mouse
 
Just change the control position by picking it up in LButton Down event and as the mouse is moved change in accordingly and LButton up place it where the mouse was released.


All times are GMT +5.5. The time now is 21:43.