Click or drag to resize

Functions.SysMetric Method

-- todo --
Returns the size of the operating system's screen elements.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.18
 FUNCTION SysMetric(
	nScreenElement AS LONG
Request Example View Source


Type: Long
Specifies a screen element. The table in the remarks section shows values for nScreenElement and the corresponding screen element:

Return Value

Type: Long
SysMetric( ) returns the size of screen elements. Screen elements include menus, windows, window controls, and the insertion point. Values are returned in pixels unless otherwise noted and can vary for different displays, display drivers, and video hardware. For further information on screen elements, refer to the GetSystemMetrics function in the MSDN Library at
SysMetric( ) enables you to determine the size of menus, windows, and window controls you create in X#. Windows and menus created with DEFINE WINDOW and DEFINE MENU use the same screen element sizes as the operating system's windows and menus.
nScreenElementScreen Element
1Screen width
2Screen height
3Width of sizable window frame
4Height of sizable window frame
5>Width of scroll arrows on vertical scroll bar
6Height of scroll arrows on vertical scroll bar
7Width of scroll arrows on horizontal scroll bar
8Height of scroll arrows on horizontal scroll bar
9Height of window title
10Width of non-sizable window frame
11Height of non-sizable window frame
12Width of DOUBLE or PANEL window frame
13Height of DOUBLE or PANEL window frame
14Scroll box width on horizontal scroll bar in text editing windows
15Scroll box height on vertical scroll bar in text editing windows
16Minimized window icon width
17Minimized window icon height
18Maximum insertion point width
19Maximum insertion point height
20Real4-line menu bar height
21Maximized window width
22Maximized window height
23Kanji window height
24Minimum sizable window width
25Minimum sizable window height
26Minimum window width
27Minimum window height
28Window controls width
29Window controls height
301 if mouse hardware present; otherwise 0
311 for Microsoft Windows debugging version; otherwise 0
321 if mouse buttons swapped; otherwise 0
33Width of a button in a half-caption window's caption or title bar
34Height of half-caption window caption area
See Also