moving a command button with mouse

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I want to have a command button on my form that when pressed it will drag to
the location where I let go of the mouse button. I have experimented with
mouseup...not working.
 
Jeff,

Use the Mouse Move event. In code, continually detect the position of the
Mouse (Mouse coordinates) and adjust the Top and Left properties of the
command button. Keep in mind you are working in Twips - 1440 Twips = 1".
 
OK....I know this will work just by placing the mouse over the command
button but what if I need to click the button....hold it down...move the
button....release to new location.
 
The directions given are exactly what you need. You must write the code to
do it.
Note that you probably want the button to jump to the new location.
 
Back
Top