sys_metrics(var mode)

Returns system information for determining various parameters of the current PC configuration.

Returns:

System information value.

Parameters:

mode - number in the range 0..87 that determines the system information to be returned.
The following numbers are available:
SM_CXSCREEN 0 Width and height of the screen of the primary display monitor, in pixels.
SM_CYSCREEN 1
SM_CXVSCROLL 2 Width of a vertical scroll bar, in pixels; and height of the arrow bitmap on a vertical scroll bar, in pixels.
SM_CYHSCROLL 3 Height of a horizontal scroll bar, in pixels.
SM_CYCAPTION 4 Height of a caption area, in pixels.
SM_CXBORDER 5 Width and height of a window border, in pixels. This is equivalent to the SM_CXEDGE value for windows with the 3-D look.
SM_CYBORDER 6
SM_CXDLGFRAME 7 Thickness of the frame around the perimeter of a window that has a caption but is not sizable, in pixels. SM_CXFIXEDFRAME is the height of the horizontal border and SM_CYFIXEDFRAME is the width of the vertical border.
SM_CYDLGFRAME 8
SM_CYVTHUMB 9 Height of the thumb box in a vertical scroll bar, in pixels.
SM_CXHTHUMB 10 Width of the thumb box in a horizontal scroll bar, in pixels.
SM_CXICON 11 Default width and height of an icon, in pixels. The LoadIcon function can load only icons of these dimensions.
SM_CYICON 12
SM_CXCURSOR 13 Width and height of a cursor, in pixels. The system cannot create cursors of other sizes.
SM_CYCURSOR 14
SM_CYMENU 15 Height of a single-line menu bar, in pixels.
SM_CXFULLSCREEN 16 Width and height of the client area for a full-screen window on the primary display monitor, in pixels.
SM_CYFULLSCREEN 17
SM_CYKANJIWINDOW 18 For double byte character set versions of the system, this is the height of the Kanji window at the bottom of the screen, in pixels.
SM_MOUSEPRESENT 19 Nonzero if a mouse is installed; zero otherwise.
SM_CYVSCROLL 20 Height of the arrow bitmap on a vertical scroll bar, in pixels.
SM_CXHSCROLL 21 Width of the arrow bitmap on a horizontal scroll bar, in pixels.
SM_DEBUG 22 Nonzero if the develop version; zero otherwise.
SM_SWAPBUTTON 23 Nonzero if the meanings of the left and right mouse buttons are swapped; zero otherwise.
SM_CXMIN 28 Minimum width and height of a window, in pixels.
SM_CYMIN 29
SM_CXSIZE 30 Width and height of a button in a window's caption or title bar, in pixels.
SM_CYSIZE 31
SM_CXFRAME 32 Thickness of the sizing border around the perimeter of a window that can be resized, in pixels. SM_CXSIZEFRAME is the width of the horizontal border, and SM_CYSIZEFRAME is the height of the vertical border.
SM_CYFRAME 33
SM_CXMINTRACK 34 Minimum tracking width and height of a window, in pixels. The user cannot drag the window frame to a size smaller than these dimensions. A window can override these values by processing the WM_GETMINMAXINFO message.
SM_CYMINTRACK 35
SM_CXDOUBLECLK 36 Width and height of the rectangle around the location of a first click in a double-click sequence, in pixels. The second click must occur within this rectangle for the system to consider the two clicks a double-click. (The two clicks must also occur within a specified time.)
SM_CYDOUBLECLK 37
SM_CXICONSPACING 38 Dimensions of a grid cell for items in large icon view, in pixels. Each item fits into a rectangle of this size when arranged. These values are always greater than or equal to SM_CXICON and SM_CYICON.
SM_CYICONSPACING 39
SM_MENUDROPALIGNMENT 40 Nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; zero if the menus are left-aligned.
SM_PENWINDOWS 41 Nonzero if the Microsoft Windows for Pen computing extensions are installed; zero otherwise.
SM_DBCSENABLED 42 Nonzero if User32.dll supports DBCS; zero otherwise.
SM_CMOUSEBUTTONS 43 Number of buttons on mouse, or zero if no mouse is installed.
SM_SECURE 44 Nonzero if security is present; zero otherwise.
SM_CXEDGE 45 Dimensions of a 3-D border, in pixels. These are the 3-D counterparts of SM_CXBORDER and SM_CYBORDER.
SM_CYEDGE 46
SM_CXMINSPACING 47 Dimensions of a grid cell for a minimized window, in pixels. Each minimized window fits into a rectangle this size when arranged. These values are always greater than or equal to SM_CXMINIMIZED and SM_CYMINIMIZED.
SM_CYMINSPACING 48
SM_CXSMICON 49 Recommended dimensions of a small icon, in pixels. Small icons typically appear in window captions and in small icon view.
SM_CYSMICON 50
SM_CYSMCAPTION 51 Height of a small caption, in pixels.
SM_CXSMSIZE 52 Dimensions of small caption buttons, in pixels.
SM_CYSMSIZE 53
SM_CXMENUSIZE 54 Dimensions of menu bar buttons, such as the child window close button used in the multiple document interface, in pixels.
SM_CYMENUSIZE 55
SM_ARRANGE 56 Flags specifying how the system arranged minimized windows. For more information about minimized windows, see the following Remarks section.
SM_CXMINIMIZED 57 Dimensions of a minimized window, in pixels.
SM_CYMINIMIZED 58
SM_CXMAXTRACK 59 Default maximum dimensions of a window that has a caption and sizing borders, in pixels. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. A window can override these values by processing the WM_GETMINMAXINFO message.
SM_CYMAXTRACK 60
SM_CXMAXIMIZED 61 Default dimensions, in pixels, of a maximized top-level window on the primary display monitor.
SM_CYMAXIMIZED 62
SM_NETWORK 63 Least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use.
SM_CLEANBOOT 67 Value that specifies how the system was started:

0 Normal boot
1 Fail-safe boot
2 Fail-safe with network boot

Fail-safe boot (also called SafeBoot, Safe Mode, or Clean Boot) bypasses the user's startup files.

SM_CXDRAG 68 Width and height of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. These values are in pixels. It allows the user to click and release the mouse button easily without unintentionally starting a drag operation.
SM_CYDRAG 69
SM_SHOWSOUNDS 70 Nonzero if the user requires an application to present information visually in situations where it would otherwise present the information only in audible form; zero otherwise.
SM_CXMENUCHECK 71 Dimensions of the default menu check-mark bitmap, in pixels.
SM_CYMENUCHECK 72
SM_SLOWMACHINE 73 Nonzero if the computer has a low-end (slow) processor; zero otherwise.
SM_MIDEASTENABLED 74 Nonzero if the system is enabled for Hebrew and Arabic languages, zero if not.
SM_MOUSEWHEELPRESENT 75 Nonzero if a mouse with a wheel is installed; zero otherwise.
SM_XVIRTUALSCREEN 76 Coordinates for the left side and the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. The SM_CXVIRTUALSCREEN, SM_CYVIRTUALSCREEN metrics are the width and height of the virtual screen.
SM_YVIRTUALSCREEN 77
SM_CXVIRTUALSCREEN 78 Width and height of the virtual screen, in pixels. The virtual screen is the bounding rectangle of all display monitors. The SM_XVIRTUALSCREEN, SM_YVIRTUALSCREEN metrics are the coordinates of the top-left corner of the virtual screen.
SM_CYVIRTUALSCREEN 79
SM_CMONITORS 80 Number of display monitors on the desktop. See Remarks for more information.
SM_SAMEDISPLAYFORMAT 81 Nonzero if all the display monitors have the same color format, zero otherwise. Note that two displays can have the same bit depth, but different color formats. For example, the red, green, and blue pixels can be encoded with different numbers of bits, or those bits can be located in different places in a pixel's color value.
SM_IMMENABLED 82 Nonzero if Input Method Manager/Input Method Editor features are enabled; zero otherwise. SM_IMMENABLED indicates whether the system is ready to use a Unicode-based IME on a Unicode application. To ensure that a language-dependent IME works, check SM_DBCSENABLED and the system ANSI code page. Otherwise the ANSI-to-Unicode conversion may not be performed correctly, or some components like fonts or registry setting may not be present.
SM_CXFOCUSBORDER 83 Width of the left and right edges and the height of the top and bottom edges of the focus rectangle. These values are in pixels.
SM_CYFOCUSBORDER 84
SM_TABLETPC 86 Nonzero if the current operating system is the Windows XP Tablet PC edition, zero if not.
SM_MEDIACENTER 87 Nonzero if the current operating system is the Windows XP, Media Center Edition, zero if not.

Remarks:

Example (lite-C):

// retrieve the width and height of the current desktop resolution
var desktop_size_x,desktop_size_y; function main() { desktop_size_x = sys_metrics(0); // SM_CXSCREEN desktop_size_y = sys_metrics(1); // SM_CYSCREEN ...

See also:

sys_seconds, sys_minutes, sys_hours, sys_day, sys_month, sys_year, sys_doy, sys_dow ► latest version online