Dragging Borderless Forms

L

Liz

I need to implement dragging a borderless form by clicking/dragging on the
form surface. Using the "standard" approach (setting "CanMove" flag on
MouseDown, moving the form by the delta of the absolute mouse movement,
unsetting the "CanMove" flag on MouseUp) I am getting a lot of "jerky"
movement of the form and can't seem to get it smooth.

I also have noticed that MouseMove seems to fire even when there is no
motion of the mouse at all (?) ... I'm using a wireless mouse; does that
make a difference ?

Can anyone point me to a solution that implements smooth movement of the
form on mouse dragging ? I would think this is a pretty common problem
......

TIA
 
M

Mick Doherty

Liz said:
Works great, Mick .... thank you ...

You're welcome!
now I have to figure out WHY and HOW they work ! It appears that the
essence of the algorithm is "tricking" Windows into thinking the user
clicked on the title bar rather than the client area of the form .... (???)
.... clever ....

That's exactly how it works.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top