Returns the dimensions of a specified element.
% = SysMetric(e%)
e%:integer expression
The SysMetric() function returns the dimensions of the element specified in e% in pixels. e% must take one of the following values:
SM_CXSCREEN (0) - screen width
SM_CYSCREEN (1) - screen height
SM_CXFRAME (32) - window rectangle width, for "sizing"
SM_CYFRAME (33) - window rectangle height, for "sizing"
SM_CXVSCROLL (2) - width of arrow fields in vertical scrollbars
SM_CYVSCROLL (20) - height of arrow fields in vertical scroll bars
SM_CXHSCROLL (21) - width of arrow fields in horizontal scroll bars
SM_CYHSCROLL (3) - height of arrow fields in horizontal scroll bars
SM_CYCAPTION (4) - title list height
SM_CXBORDER (5) - window rectangle width
SM_CYBORDER (6) - window rectangle height
SM_CXDLGFRAME (7) - width of a Dialog box frame
SM_CYDLGFRAME (8) - height of a Dialog box frame
SM_CXHTHUMB (10) - width of the vertical scroll bar
SM_CYVTHUMB (9) - height of the vertical scroll bar
SM_CXICON (11) - icon width
SM_CYICON (12) - icon height
SM_CXCURSOR (13) - cursor width
SM_CYCURSOR (14) - cursor height
SM_CYMENU (15) - height of a single line menu bar
SM_CXFULLSCREEN (16) - maximum width of the window client area
SM_CYFULLSCREEN (17) - maximum height of the window client area
SM_CYKANJIWINDOW (18) - height of a Kanji window
SM_CXMINTRACK (34) - minimum tracking width of a window
SM_CYMINTRACK (35) - minimum tracking height of a window
SM_CXMIN (28) - minimum width of a window
SM_CYMIN (29) - minimum height of a window
SM_CXSIZE (30) - width of bitmap in the title bar
SM_CYSIZE (31) - height of bitmap in the title bar
SM_MOUSEPRESENT (19) - not zero if mouse is installed.
SM_MOUSEWHEELPRESENT (75) - not zero if mouse wheel is present.
SM_DEBUG (22) - not zero in case of Windows debugging version.
SM_SWAPBUTTON (23) - not zero if the left and right mouse buttons are swapped.
SM_CXDOUBLECLK (36) - width in pixels, for double clicking sequence.
SM_CYDOUBLECLK (37) - height in pixels, for double clicking sequence.
SM_CXICONSPACING (38) - distance width between the icons, in pixels
SM_CYICONSPACING (39) - distance height between the icons, in pixels
SM_MENUDROPALIGNMENT (40) - true if right aligned menus are in use
SM_PENWINDOWS (41) - true, if a Pen Windows is in use
SM_DBCSENABLED (42) - true, if a double byte character is in use (far east - actually GB32 doesn’t work correct in this direction).
SM_CMOUSEBUTTONS (43) - number of mouse buttons (2, 3, or 0).
SM_CXDLGFRAMEThe width of a frame of a non-sizeable window with title.
SM_CXSIZEFRAME (32) - SM_CXFRAME window rectangle width, for "sizing".
SM_CYSIZEFRAME (33) - SM_CYFRAME window rectangle height, for "sizing".
SM_SECURE (44) - true is the security package is available.
SM_CXEDGE (45) - the dimension of a 3D border in pixels
SM_CYEDGE (46) - the dimension of a 3D border in pixels
SM_CXMINSPACING (47) - width of the distance between symbols (NT 3.51)
SM_CYMINSPACING (48) - height of the distance between symbols (NT 3.51)
SM_CXSMICON (49) - the width of a small icon
SM_CYSMICON (50) - the height of a small icon
SM_CYSMCAPTION (51) - the height of a small title in pixels.
SM_CXSMSIZE (52) - the width of the buttons in the title of windows, given in pixels.
SM_CYSMSIZE (53) - the height of the buttons in the title of windows, given in pixels.
SM_CXMENUSIZE (54) - the width of the buttons, etc. in the title of a MDI child window, in pixels
SM_CYMENUSIZE (55) - the height of the buttons, etc. in the title of a MDI child window, in pixels
SM_ARRANGE (56) - the minimizing position of windows
0 starts left hand below (Default Position).
1 starts right hand below
2 starts top left
3 starts top right
0+4 starts left below and forward in vertical direction to the top
1+4 starts right below and forward in vertical direction to the top
2+4 starts top left, vertical
3+4 starts top right, vertical
8 during minimizing the window is hidden
SM_CXMINIMIZED (57) - width of a minimized window in pixels.
SM_CYMINIMIZED (58) - height of a minimized window in pixels.
SM_CXMAXTRACK (59) - maximum width of a window during changing it’s size (with the mouse).
SM_CYMAXTRACK (60) - maximum height of a window during changing it’s size (with the mouse).
SM_CXMAZIMIZED (61) - width of a maximized window in pixels.
SM_CYMAXIMIZED (62) - height of a maximized window in pixels.
SM_NETWORK (63) - true, if a Windows network is active. An odd value for a known on, otherwise an even one.
SM_CLEANBOOT (67) - 0 = normal,1 = protected mode, 2 = protected with network.
SM_CXDRAG (68) - the width of a range which will be used to allow a minimum movement of the mouse while double clicking, without a drag (to start the movement with the mouse) is happend.
SM_CYDRAG (69) - the height of a range which will be used to allow a minimum movement of the mouse while double clicking, without a drag (to start the movement with the mouse) is happend.
SM_SHOWSOUNDS (70) - true, if Windows use optical messages instead of acoustic ones; for people with a hearing damage and circumstances permitting for the usage in an open plain office (can be controlled from the system control).
SM_CXMENUCHECK (71) - width of the hook let in pixels for corresponding menu entries.
SM_CYMENUCHECK (72) - height of the hook let in pixels for corresponding menu entries.
SM_SLOWMACHINE (73) - true, it the computer is slow (subjective scoring of the operating system).
SM_MIDEASTENABLED (74) - true in the far east.
SM_CMETRICS (76) - value of numbers for the parameter GetSystemMetrics.
Debug.Show
Trace SysMetric(SM_CXCURSOR)
Returns the width of the cursor
The Screen Object returns the same values and more.
{Created by Sjouke Hamstra; Last updated: 24/10/2014 by James Gaite}