By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,223 Members | 1,434 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,223 IT Pros & Developers. It's quick & easy.

Dragging Borderless Forms

P: n/a
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

Apr 21 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
http://www.dotnetrix.co.uk/misc.html

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Liz" <li*@no-spam.org> wrote in message
news:Ri*******************@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

Apr 21 '06 #2

P: n/a
Liz

"Mick Doherty"
<EX***********@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> wrote in
message news:%2****************@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

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
"Liz" <li*@no-spam.org> wrote in message
news:Ri*******************@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


Apr 22 '06 #3

P: n/a

"Liz" <li*@no-spam.org> wrote in message
news:Vx*******************@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.

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
Apr 22 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.