Hi,

I want to capture the move of a form with an override of OnMove, which
works fine.

But I want to register also when a user starts moving a form and when
he releases it, any idea how to accomplish that?

Here is what I tried so far without success:

- Capturing the OnMouseCaptureChanged: As the Capture flag is set
during the form move and is unset after, I expected this event to be
fired, but it isn't. So it does not help...

- Overriding WndProc and capturing WM_NCLMOUSEDOWN, WM_NCLMOUSEUP,
WM_LMOUSEUP: To register the mouse down in the HTCAPTION and the mouse
up as the end of the dragging of the form. I receive the nc mouse down
event, but I never get a mouse up, except if the form is maximized. No
idea, why that is... the form has a sizeable toolbar frame.

Anybody any other ideas?

Re: Capture Form Move - Start and Stop by Stoitcho

Stoitcho
Tue Jan 10 10:03:16 CST 2006

John,

Catch WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE windows messages. These are the
markers that Windows puts et the begining and at the end of the move/resize
modal loop.


--
HTH
Stoitcho Goutsev (100)

<johns1111@gmx.de> wrote in message
news:1136755083.645690.303210@g44g2000cwa.googlegroups.com...
> Hi,
>
> I want to capture the move of a form with an override of OnMove, which
> works fine.
>
> But I want to register also when a user starts moving a form and when
> he releases it, any idea how to accomplish that?
>
> Here is what I tried so far without success:
>
> - Capturing the OnMouseCaptureChanged: As the Capture flag is set
> during the form move and is unset after, I expected this event to be
> fired, but it isn't. So it does not help...
>
> - Overriding WndProc and capturing WM_NCLMOUSEDOWN, WM_NCLMOUSEUP,
> WM_LMOUSEUP: To register the mouse down in the HTCAPTION and the mouse
> up as the end of the dragging of the form. I receive the nc mouse down
> event, but I never get a mouse up, except if the form is maximized. No
> idea, why that is... the form has a sizeable toolbar frame.
>
> Anybody any other ideas?
>