>I have a form (dialog) withut a title bar
>how can I allow users to move the form?
>
>I have this in the form's MouseDown event:
>
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>
>thisform.nMouseX = nXCoord
>thisform.nMouseY = nYCoord
>
>
>this does not get executed when i click on the form itself!
Put a transparent shape on your form behind everything and trap the movement on there.
You need to use the MouseMove event and trap the condition of the nButton being down.
Perhaps a better way to do it is to trap the MouseDown event on your form somewhere where there is no other event that's triggered, and then monitor MouseMove to see if the user is left-clicking for more than a few pixels. If so, then BINDEVENT(thisForm.hwnd, WM_MOUSEMOVE, thisForm, "myCustomMouseMoveEvent") and monitor those locations. Use the Windows function GetAsyncKeyState() to read the mouse button state (
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646293%28v=vs.85%29.aspx) and GetCursorPos() to find out where the mouse is on the entire desktop (
http://msdn.microsoft.com/en-us/library/windows/desktop/ms648390%28v=vs.85%29.aspx) and then begin reading mouse deltas from the original location and position your form adjusted by those deltas from its original position.
Once the mouse button is released, UNBINDEVENT().