Platforms to show: All Mac Windows Linux Cross-Platform
WindowsSystemMetricsMBS(what as Integer) as Integer
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
global method | System | MBS Win Plugin | 3.1 | ❌ No | ✅ Yes | ❌ No | ❌ No | Desktop, Console & Web |
All dimensions retrieved by GetSystemMetrics are in pixels.
If the function fails, the return value is zero.
Values for the what parameter:
SM_ARRANGE | 56 | Flags specifying how the system arranged minimized windows. For more information about minimized windows, see the following Remarks section. |
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) bypasses the user's startup files. |
SM_CMETRICS | 83 | (Windows 2000 or newer) |
SM_CMONITORS | 80 | Number of display monitors on the desktop. (Windows 2000 or newer) |
SM_CMOUSEBUTTONS | 43 | Number of buttons on mouse, or zero if no mouse is installed. |
SM_CXBORDER | 5 | Width, in pixels, of a window border. |
SM_CXCURSOR | 13 | Width, in pixels, of a cursor. The system cannot create cursors of other sizes. |
SM_CXDLGFRAME | 7 | Thickness, in pixels, of the sizing border around the perimeter of a window that can be resized. (or SM_CXFIXEDFRAME) |
SM_CXDOUBLECLK | 36 | Width, in pixels, of the rectangle around the location of a first click in a double-click sequence. 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_CXDRAG | 68 | Width, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. |
SM_CXEDGE | 45 | Width, in pixels, of a 3-D border. |
SM_CXFRAME | 32 | Thickness, in pixels, of the sizing border around the perimeter of a window that can be resized. (or SM_CXSIZEFRAME) |
SM_CXFULLSCREEN | 16 | Width of the client area for a full-screen window on the primary display monitor. |
SM_CXHSCROLL | 21 | Width, in pixels, of the arrow bitmap on a horizontal scroll bar. |
SM_CXHTHUMB | 10 | Width, in pixels, of the thumb box in a horizontal scroll bar. |
SM_CXICON | 11 | The default width, in pixels, of an icon. TheLoadIcon function can load only icons of these dimensions. |
SM_CXICONSPACING | 38 | Width, in pixels, of a grid cell for items in large icon view. 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_CXMAXIMIZED | 61 | Default width, in pixels, of a maximized top-level window on the primary display monitor. |
SM_CXMAXTRACK | 59 | Default maximum width, in pixels, of a window that has a caption and sizing borders. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. |
SM_CXMENUCHECK | 71 | Width, in pixels, of the default menu check-mark bitmap. |
SM_CXMENUSIZE | 54 | Width, in pixels, of menu bar buttons, such as the child window close button used in the multiple document interface. |
SM_CXMIN | 28 | Minimum width, in pixels, of a window. |
SM_CXMINIMIZED | 57 | Width, in pixels, of a normal minimized window. |
SM_CXMINSPACING | 47 | Width, in pixels, of a grid cell for minimized windows. 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_CXMINTRACK | 34 | Minimum tracking width, in pixels, of a window. 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_CXSCREEN | 0 | Width, in pixels, of the screen of the primary display monitor. |
SM_CXSIZE | 30 | Width, in pixels, of a button in a window's caption or title bar. |
SM_CXSMICON | 49 | Recommended width, in pixels, of a small icon. Small icons typically appear in window captions and in small icon view. |
SM_CXSMSIZE | 52 | Width, in pixels, of small caption buttons. |
SM_CXVIRTUALSCREEN | 78 | Width, in pixels, of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. (Windows 98/ME and 2000 or newer) |
SM_CXVSCROLL | 2 | Width, in pixels, of a vertical scroll bar; and height, in pixels, of the arrow bitmap on a vertical scroll bar. |
SM_CYBORDER | 6 | Height, in pixels, of a window border. |
SM_CYCAPTION | 4 | Height, in pixels, of a normal caption area. |
SM_CYCURSOR | 14 | Height, in pixels, of a cursor. The system cannot create cursors of other sizes. |
SM_CYDLGFRAME | 8 | Thickness, in pixels, of the frame around the perimeter of a window that has a caption but is not sizable. (or SM_CYFIXEDFRAME) |
SM_CYDOUBLECLK | 37 | Height, in pixels, of the rectangle around the location of a first click in a double-click sequence. 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_CYDRAG | 69 | Height, in pixels, of a rectangle centered on a drag point to allow for limited movement of the mouse pointer before a drag operation begins. This allows the user to click and release the mouse button easily without unintentionally starting a drag operation. |
SM_CYEDGE | 46 | Height, in pixels, of a 3-D border. |
SM_CYFRAME | 33 | Thickness, in pixels, of the frame around the perimeter of a window that has a caption but is not sizable. (or SM_CYSIZEFRAME) |
SM_CYFULLSCREEN | 17 | Height of the client area for a full-screen window on the primary display monitor. |
SM_CYHSCROLL | 3 | Height, in pixels, of a horizontal scroll bar. |
SM_CYICON | 12 | The default height, in pixels, of an icon. TheLoadIcon function can load only icons of these dimensions. |
SM_CYICONSPACING | 39 | Height, in pixels, of a grid cell for items in large icon view. 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_CYKANJIWINDOW | 18 | For double-byte character set versions of the system, this is the height, in pixels, of the Kanji window at the bottom of the screen. |
SM_CYMAXIMIZED | 62 | Default height, in pixels, of a maximized top-level window on the primary display monitor. |
SM_CYMAXTRACK | 60 | Default maximum height, in pixels, of a window that has a caption and sizing borders. This metric refers to the entire desktop. The user cannot drag the window frame to a size larger than these dimensions. |
SM_CYMENU | 15 | Height, in pixels, of a single-line menu bar. |
SM_CYMENUCHECK | 72 | Height, in pixels, of the default menu check-mark bitmap. |
SM_CYMENUSIZE | 55 | Height, in pixels, of menu bar buttons, such as the child window close button used in the multiple document interface. |
SM_CYMIN | 29 | Minimum height, in pixels, of a window. |
SM_CYMINIMIZED | 58 | Height, in pixels, of a normal minimized window. |
SM_CYMINSPACING | 48 | Height, in pixels, of a grid cell for minimized windows. 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_CYMINTRACK | 35 | Minimum tracking height, in pixels, of a window. 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_CYSCREEN | 1 | Height, in pixels, of the screen of the primary display monitor. |
SM_CYSIZE | 31 | Height, in pixels, of a button in a window's caption or title bar. |
SM_CYSMCAPTION | 51 | Height, in pixels, of a small caption. |
SM_CYSMICON | 50 | Recommended height, in pixels, of a small icon. Small icons typically appear in window captions and in small icon view. |
SM_CYSMSIZE | 53 | Height, in pixels, of small caption buttons. |
SM_CYVIRTUALSCREEN | 79 | Height, in pixels, of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. (Windows 98/ME and 2000 or newer) |
SM_CYVSCROLL | 20 | Height, in pixels, of a vertical scroll bar; and height, in pixels, of the arrow bitmap on a vertical scroll bar. |
SM_CYVTHUMB | 9 | Height, in pixels, of the thumb box in a vertical scroll bar. |
SM_DBCSENABLED | 42 | TRUE or nonzero if the double-byte character set (DBCS) version of USER.EXE is installed; FALSE or zero otherwise. |
SM_DEBUG | 22 | TRUE or nonzero if the debugging version of USER.EXE is installed; FALSE or zero otherwise. |
SM_IMMENABLED | 82 | (Windows 2000 or newer) |
SM_MENUDROPALIGNMENT | 40 | TRUE or nonzero if drop-down menus are right-aligned with the corresponding menu-bar item; FALSE or zero if the menus are left-aligned. |
SM_MIDEASTENABLED | 74 | TRUE if the system is enabled for Hebrew and Arabic languages. |
SM_MOUSEPRESENT | 19 | TRUE or nonzero if a mouse is installed; FALSE or zero otherwise. |
SM_MOUSEWHEELPRESENT | 75 | TRUE or nonzero if a mouse with a wheel is installed; FALSE or zero otherwise. (Windows 98/ME/2000 or newer) |
SM_NETWORK | 63 | The least significant bit is set if a network is present; otherwise, it is cleared. The other bits are reserved for future use |
SM_PENWINDOWS | 41 | TRUE or nonzero if the Microsoft Windows for Pen computing extensions are installed; FALSE or zero otherwise. |
SM_REMOTESESSION | &h1000 | (Windows 2000 or newer) |
SM_SAMEDISPLAYFORMAT | 81 | TRUE if all the display monitors have the same color format, FALSE 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. (Windows 98/ME/2000 or newer) |
SM_SECURE | 44 | TRUE if security is present; FALSE otherwise. |
SM_SHOWSOUNDS | 70 | TRUE or nonzero if the user requires an application to present information visually in situations where it would otherwise present the information only in audible form; FALSE, or zero, otherwise. |
SM_SLOWMACHINE | 73 | TRUE if the computer has a low-end (slow) processor; FALSE otherwise. |
SM_SWAPBUTTON | 23 | TRUE or nonzero if the meanings of the left and right mouse buttons are swapped; FALSE or 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. (Windows 98/ME/2000 or newer) |
SM_YVIRTUALSCREEN | 77 | Coordinates for the left side and the top of the virtual screen. The virtual screen is the bounding rectangle of all display monitors. (Windows 98/ME/2000 or newer) |
The SM_ARRANGE setting specifies how the system arranges minimized windows, and consists of a starting position and a direction. The starting position can be one of the following values:
ARW_BOTTOMLEFT | 0x0000L | Start at the lower-left corner of the screen (default position). |
ARW_BOTTOMRIGHT | 0x0001L | Start at the lower-right corner of the screen. Equivalent to ARW_STARTRIGHT. |
ARW_HIDE | 0x0008L | Hide minimized windows by moving them off the visible area of the screen. |
ARW_TOPLEFT | 0x0002L | Start at the upper-left corner of the screen. Equivalent to ARV_STARTTOP. |
ARW_TOPRIGHT | 0x0003L | Start at the upper-right corner of the screen. Equivalent to ARW_STARTTOP | SRW_STARTRIGHT. |
The direction in which to arrange can be one of the following values:
ARW_DOWN | 0x0004L | Arrange vertically, top to bottom. |
ARW_LEFT | 0x0000L | Arrange horizontally, left to right. |
ARW_RIGHT | 0x0000L | Arrange horizontally, right to left. |
ARW_UP | 0x0004L | Arrange vertically, bottom to top. |
see also
http://msdn.microsoft.com/en-us/library/windows/desktop/ms724385(v=vs.85).aspx
Some examples using this global method:
The items on this page are in the following plugins: MBS Win Plugin.