_X returns the width of the current window in pixels, _Y the height.
x% = _X
y% = _Y
x%,y% | : pixels as integer value |
By using _X, _Y, and _C programs can be written regardless of the resolution or window size.
If no window is open _X and _Y return the width and height respectively of the whole screen. Otherwise, they return the width and height of the current window or form (or Me).
OpenW # 1, 10, 10, 400, 300, -1
Print _X ``_Y
Before opening a window, _X and _Y return the size of the available working screen and correspond in this case with Screen.WorkWidth and Screen.WorkHeight.
We recommend using the Screen functions if you need any information about the screen or a window. (The Screen functions will correspond and work like the old 16 bit: GetSystemMetrics.)
To get the working area of an opened form, use WorkWidth and WorkHeight instead.
_C, Screen, GetClientSize, GetWorkArea, GetWinPos,WorkWidth, WorkHeight .
{Created by Sjouke Hamstra; Last updated: 02/03/2022 by James Gaite}