GetWindowSize()
Summary
Determines the size of a window.
Syntax
size = GetWindowSize(string window)
| Argument | Contents |
|---|---|
| window | String of the form "window type|window name," or "window name" if the window name is unique among the window types, or null for the current window |
Returns
An array of two integers indicating the size of the window:
| Element | Type | Contents |
|---|---|---|
| 1 | Integer | The width of the window |
| 2 | Integer | The height of the window |
Notes
-
Both sizes are expressed as percentages of the Maptitude frame window; that is, the values for width and height are always less than or equal to 100.
-
GetWindowSize() returns {100, 100} for a maximized window and {0, 0} for a minimized window.
-
For more information on window types, see Windows.
Example
// Before running the example, open any map.
sz = GetWindowSize(GetMap())
ShowArray(sz)
See Also
| Function | Summary |
|---|---|
| GetAbsoluteWindowSize() | Determines the absolute size of a window in inches |
| SetWindowSize() | Sets the size of a window |
| GetWindowPosition() | Gets the position of a window |