Syntax
|
AppMove
X, Y [,name$]
|
Description
|
Sets the upper left corner of the named application to a given location.
|
Comments
|
The
AppMove
statement takes the following parameters:
|
|
Parameter
|
Description
|
|
X, Y
|
Integer coordinates specifying the upper left corner of the new location of the application, static to the upper left corner of the display.
|
|
name$
|
String containing the name of the application to move. If this parameter is omitted, then the active application is moved.
|
Example
|
This example activates Program Manager, then moves it 10 pixels to the right.
Sub Main()
Dim x%,y%
AppActivate "Program Manager" 'Activate Program Manager.
AppGetPosition x%,y%,0,0 'Retrieve its position.
x% = x% + Screen.TwipsPerPixelX * 10 'Add 10 pixels.
AppMove x% + 10,y% 'Nudge it 10 pixels to the right.
End Sub
|
See Also
|
AppMaximize (statement); AppMinimize (statement); AppRestore (statement); AppSize (statement); AppClose (statement).
|
Note
|
If the named application is maximized or hidden, the
AppMove
statement will have no effect.
The X and Y parameters are specified in twips.
AppMove
will accept X and Y parameters that are off the screen.
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.
AppMove
generates a runtime error if the named application is not enabled, as is the case if that application is currently displaying a modal dialog box.
|