AppGetPosition (statement)

Syntax AppGetPosition X,Y,width,height [,name$]
Description Retrieves the position of the named application.
Comments The AppGetPosition statement takes the following parameters:
Parameter Description
X, Y Names of Integer variables to receive the position of the application's window.
width, height Names of Integer variables to receive the size of the application's window.
Name$ String containing the name of the application. If the name$ parameter is omitted, then the active application is used.
The x, y, width, and height variables are filled with the position and size of the application's window. If an argument is not a variable, then the argument is ignored, as in the following example, which only retrieves the x and y parameters and ignores the width and height parameters:
  Dim x As Integer,y As Integer
  AppGetPosition x,y,0,0,"Program Manager"
Example
Sub Main()
  Dim x As Integer,y As Integer
  Dim cx As Integer,cy As Integer
  AppGetPosition x,y,cx,cy,"Program Manager"
End Sub
See Also AppMove (statement); AppSize (statement).
Note The position and size of the window are returned in twips. The name$ parameter is the exact string appearing in the title bar of the named application's main window. If no application is found whose title exactly matches name$, then a second search is performed for applications whose title string begins with name$. If more than one application is found that matches name$, then the first application encountered is used.