Partager via


SYSMETRIC( ) Function

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

SYSMETRIC(nScreenElement)

Return Value

Character

Parameters

  • nScreenElement
    Specifies a screen element. The following table shows values for nScreenElement and the corresponding screen element:

    nScreenElement

    Screen Element

    1

    Screen width

    2

    Screen height.

    3

    Width of sizable window frame

    4

    Height of sizable window frame

    5

    Width of scroll arrows on vertical scroll bar

    6

    Height of scroll arrows on vertical scroll bar

    7

    Width of scroll arrows on horizontal scroll bar

    8

    Height of scroll arrows on horizontal scroll bar

    9

    Height of window title

    10

    Width of non-sizable window frame

    11

    Height of non-sizable window frame

    12

    Width of DOUBLE or PANEL window frame

    13

    Height of DOUBLE or PANEL window frame

    14

    Scroll box width on horizontal scroll bar in text editing windows

    15

    Scroll box height on vertical scroll bar in text editing windows

    16

    Minimized window icon width

    17

    Minimized window icon height

    18

    Maximum insertion point width

    19

    Maximum insertion point height

    20

    Single-line menu bar height

    21

    Maximized window width

    22

    Maximized window height

    23

    Kanji window height

    24

    Minimum sizable window width

    25

    Minimum sizable window height

    26

    Minimum window width

    27

    Minimum window height

    28

    Window controls width

    29

    Window controls height

    30

    1 if mouse hardware present; otherwise 0

    31

    1 for Microsoft Windows debugging version; otherwise 0

    32

    1 if mouse buttons swapped; otherwise 0

    33

    Width of a button in a half-caption window's caption or title bar

    34

    Height of half-caption window caption area

Remarks

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 https://msdn.microsoft.com/library.

SYSMETRIC( ) enables you to determine the size of menus, windows, and window controls you create in Visual FoxPro. Windows and menus created with DEFINE WINDOW and DEFINE MENU use the same screen element sizes as the operating system's windows and menus.

See Also

Reference

FONTMETRIC( ) Function

GETFONT( ) Function

TXTWIDTH( ) Function

WFONT( ) Function

Other Resources

Functions

Language Reference (Visual FoxPro)