Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form_Move event. 1

Status
Not open for further replies.

RichardF

Programmer
Oct 9, 2000
239
GB
I know - there isn't a form move event.

Does anyone know a way to detect if a form has been moved by the user ?

R.
 
i'm not sure thats at all helpful.

how do i distinguish between when a user moves the form or when another form is moved over this form (which also causes a form_paint event), or when the form is maximised etc .... ?
 
You could compare the Form.Left and Form.Top values from the last time it was painted. If they have changed, then the form was moved; if not, then another form was moved over it.

Regards,
Suresh
 
SubClass the form using the SetWindowsHookEx and look for the WM_MOVING message for you form's hWnd. - Jeff Marler B-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top