Home All Groups Group Topic Archive Search About

Dragging Borderless Forms

Author
21 Apr 2006 6:15 PM
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

Author
21 Apr 2006 7:28 PM
Mick Doherty
http://www.dotnetrix.co.uk/misc.html

Show quote Hide quote
"Liz" <liz@no-spam.org> wrote in message
news:Ri92g.42712$zy2.40333@fe08.news.easynews.com...
>
> 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
>
>
>
Author
22 Apr 2006 4:45 AM
Liz
"Mick Doherty"
<EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:%23ECiUnXZGHA.4424@TK2MSFTNGP05.phx.gbl...
> http://www.dotnetrix.co.uk/misc.html

Works great, Mick .... thank you ... 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 ....

L




Show quoteHide quote
> --
> Mick Doherty
> http://dotnetrix.co.uk/nothing.html
>
>
> "Liz" <liz@no-spam.org> wrote in message
> news:Ri92g.42712$zy2.40333@fe08.news.easynews.com...
>>
>> 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
>>
>>
>>
>
>
Author
22 Apr 2006 8:00 AM
Mick Doherty
"Liz" <liz@no-spam.org> wrote in message
news:Vxi2g.55892$Qb5.20179@fe01.news.easynews.com...
>
> 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.