JavaScript Editor js editor     Web development 



Main Page

Moves the specified window to the new location specified by pt.

void _WMove(WHANDLE wh, Point pt)
WHANDLE wh;            /* Window handle. */
Point pt;                     /* New location. */

Remarks

The pt parameter specifies the position of the upper-left corner of the window in rows and columns. The new position can place the window partially or completely off the screen.

For more information on how to create an API library and integrate it with Visual FoxPro, see Accessing the Visual FoxPro API.

Example

The following example moves the active window diagonally 10 rows down and 10 columns to the right.

Visual FoxPro Code

В Copy Code
SET LIBRARY TO WMOVE 
=WMOVE()

C Code

В Copy Code
#include <pro_ext.h>

void FAR WMoveEx(ParamBlk FAR *parm)
{
   WHANDLE wh = _WOnTop();
   Point newPos;

   newPos.v = _WTop(wh)  + 10;
   newPos.h = _WLeft(wh) + 10;

   _WMove(wh, newPos);
}

FoxInfo myFoxInfo[] = {
   {"WMOVE", (FPFI) WMoveEx, 0, ""},
};
FoxTable _FoxTable = {
   (FoxTable FAR *) 0, sizeof(myFoxInfo)/sizeof(FoxInfo), myFoxInfo
};

See Also



JavaScript Editor js editor     Web development