DECLARE INTEGER SendMessage IN USER32 INTEGER, INTEGER, INTEGER, INTEGER>
#DEFINE WM_NCLBUTTONDOWN 0xA1
>Const HTCAPTION = 2#DEFINE HTCAPTION 2>
lngReturnValue = SendMessage(Form1.hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0)VFP6 does not provide an hWnd to the form as a native property; you can get it via FOXTOOLS or any pf several possible API calls. The VFP7 beta release provides an hWnd for the form as a native property. If you know a form is the active window, GetActiveWindow() is about as simple a call as you can use:
* In Form1 somewhere when you know the form is on top and active DECLARE INTEGER GetActiveWindow IN WIN32API IF TYPE('thisform.hWnd') = 'U' thisform.ADDPROPERTY('hWnd') ENDIF thisform.hWnd = GetActiveWindow()You may find VFP's treatment of non-client regions of a form to be different than VB's.