CitrixWindowMove function

Action

Moves the specified window. The target position can either be specified absolutely or relative to the current position.

Include file

CitrixAPI.bdh

Syntax

CitrixWindowMove( in nWindow   : number,
            in nX        : number,
            in nY        : number,
            in bRelative : boolean optional ): boolean;

Return value

  • true if the function succeeds

  • false otherwise

Parameter Description
nWindow Window handle returned by a call to CitrixWaitForWindowCreation or the SearchWindow functions.
nX When bRelative is omitted or set to false, the left margin of the window is moved to this X-coordinate. When bRelative is set to true, the window is moved horizontally nX pixels (may be a negative value).
nY When bRelative is omitted or set to false, the top margin of the window is moved to this Y-coordinate. When bRelative is set to true, the window is moved vertically nY pixels (may be a negative value).
bRelative Specifies whether the nX and nY parameters are interpreted as absolute coordinates or as a move vector (optional).

Example:

  transaction TMain
  var
  begin
    CitrixInit(640, 480);
    CitrixConnect("myserver", "myusername", "mypass", "mydomain", COLOR_16bit);
    CitrixWaitForLogon();
    hWnd6 := CitrixWaitForWindowCreation("ICA Seamless Host Agent", MATCH_Exact, 0x94C800C4, 0, 0, 390, 223);
    CitrixWaitForWindow(hWnd6, EVENT_Activate);
    CitrixWaitForWindowCreation("Program Manager");
    CitrixMouseClick(182, 195, hWnd6, MOUSE_ButtonLeft);
    CitrixWaitForWindow(hWnd6, EVENT_Destroy);
    ThinkTime(2.78);
    CitrixMouseDblClick(38, 22, DESKTOP, MOUSE_ButtonLeft);
    hWnd8 := CitrixWaitForWindowCreation("My Documents", MATCH_Exact, 0x16CF0000, 285, 31, 268, 205);
    CitrixWaitForWindow(hWnd8, EVENT_Activate);
    CitrixWindowMove(hWnd8, 10, 10, true);
    wait 
            1.0;
    CitrixMouseClick(258, 13, hWnd8, MOUSE_ButtonLeft);
    CitrixWaitForWindow(hWnd8, EVENT_Destroy);
    CitrixDisconnect();
  end TMain;