You need the capture the MouseDown event in your control, capture the
point in which he pussed, passed in the argument(e) in the event, and
set a flag to true.
Then capture the MouseMove event, and if the flag is true, calculate the
differnce between the point passed now and the captured before in the
MouseDown. Add the difference to your component location, and you had
moved it!
Finally capture the MouseUp event, and set the flag to false.

Good luck!

-----Mensaje original-----
De: dotnet discussion [mailto:[EMAIL PROTECTED]] En nombre de
Shishir Kumar Mishra
Enviado el: jueves, 25 de abril de 2002 11:26
Para: [EMAIL PROTECTED]
Asunto: [DOTNET] to move the control at run time

Hi Lists!
how to allow my user to move my controls around with the mouse?

thanx in advance....
Shishir Kumar Mishra
Agni Software (P) Ltd.,
Bangalore-560055, India
www.agnisoft.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to