4D v13.4

SET WINDOW RECT

Home

 
4D v13.4
SET WINDOW RECT

SET WINDOW RECT 


 

SET WINDOW RECT ( left ; top ; right ; bottom {; window}{; *} ) 
Parameter Type   Description
left  Longint in Global left coordinate of window's contents area
top  Longint in Global top coordinate of window's contents area
right  Longint in Global right coordinate of window's contents area
bottom  Longint in Global bottom coordinate of window's contents area
window  WinRef in Window reference number, or Frontmost window of current process, if omitted
Operator in If omitted (default) = change window to foreground
If passed = do not change the level of the window

The SET WINDOW RECT command changes the global coordinates of the the window whose reference number is passed in window. If the window does not exist, the command does nothing.

If you omit the window parameter, SET WINDOW RECT applies to the frontmost window for the current process.

This command can resize and move the window, depending on the new coordinates passed.

The coordinates must be expressed relative to the top left corner of the contents area of the application window (on Windows) or to the main screen (on Macintosh). The coordinates indicate the rectangle corresponding to the contents area of the window (excluding title bars and borders).

Warning: Be aware that by using this command, you may move a window beyond the limits of the main window (on Windows) or of the screens (on Macintosh). To prevent this, use commands such as Screen width and Screen height to double-check the new coordinates of the window.

By default, executing this command automatically moves the window designated by the window parameter to the foreground (if this parameter is used). You can disable this by passing the * as the last parameter. In this case, the command no longer changes the original level ("z" coordinate) of the window.

This command does not affect form objects. If the window contains a form, the form objects are not moved or resized by the command (regardless of their properties). Only the window is modified. In order to modify a form window while taking the resizing properties and the objects it contains into account, you must use the RESIZE FORM WINDOW command.

See example for the WINDOW LIST command.

Given the following window:

After execution of the following line:

 SET WINDOW RECT(100;100;300;300)

The window appears as follows:

 
PROPERTIES 

Product: 4D
Theme: Windows
Number: 444

 
INDEX

Alphabetical list of commands

 
HISTORY 

New
Modified: 4D 2004
Modified: 4D v13

 
SEE ALSO 

DRAG WINDOW
GET WINDOW RECT
RESIZE FORM WINDOW