WinMetrics

Returns Windows system information.

Syntax:

WinMetrics (request#)

Parameters:

(i) request# see below.

Returns:

(i) see below.

 

The request# parameter determines what piece of information will be returned.

Request

Return Value

-7

2 if WOW64 (32-bit emulation under 64-bit Windows), 0 otherwise.

-6

pixels per horizontal dialog unit

-5

pixels per vertical dialog unit

-4

Windows Platform
0 = Other
1 = Windows 3.x
2 = Windows for Workgroups
3 = Win32s
4 = Windows NT Family (e.g. 4.0 / 2000 / XP / 2003 / Vista / 7 / 8 / 8.1 / 10 / 11  / corresponding Windows server versions.)
5 = Windows 95/98/ME

-3

WIL EXE type
0=Win16
1=Intel32
2=Alpha32
3=Mips32
4=PowerPC32
5=64-bit WinBatch on Intel64/AMD64

-2

WIL platform
1=Win16
2=Win32
3=Win64

-1

Number of colors supported by video driver

0

Width of screen, in pixels

1

Height of screen, in pixels

2

Width of arrow on vertical scrollbar

3

Height of arrow on horizontal scrollbar

4

Height of window title bar

5

Width of window border lines

6

Height of window border lines

7

Width of dialog box frame

8

Height of dialog box frame

9

Height of thumb box on scrollbar

10

Width of thumb box on scrollbar

11

Width of an icon

12

Height of an icon

13

Width of a cursor

14

Height of a cursor

15

Height of a one line menu bar

16

Width of full screen window

17

Height of a full screen window

18

Height of Kanji window (Japanese)

19

Is a mouse present (0 = No, 1 = Yes)

20

Height of arrow on vertical scrollbar

21

Width of arrow on horizontal scrollbar

22

Is debug version of Windows running (0 = No, 1 = Yes)

23

Are Left and Right mouse buttons swapped (0 = No, 1 = Yes)

24

Reserved

25

Reserved

26

Reserved

27

Reserved

28

Minimum width of a window

29

Minimum height of a window

30

Width of bitmaps in title bar 

31

Height of bitmaps in title bar

32

Width of sizeable window frame

33

Height of sizeable window frame

34

Minimum tracking width of a window

35

Minimum tracking height of a window

41

@TRUE or non-zero if the Microsoft Windows for Pen computing extensions are installed; zero, or @FALSE, otherwise.

42

@TRUE or non-zero if the double-byte character set (DBCS) version of USER.EXE is installed; @FALSE, or zero otherwise.

43

Number of buttons on mouse, or zero if no mouse is installed.

44

Not supported.

63

Not supported. 

67

Not supported.

70

@TRUE or non-zero 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.

73

Not supported.

74

Not supported.

75

(WinNT 4.0+) Non-zero if a mouse with a wheel is installed, zero otherwise

76

(Win2000 and newer) Coordinates for the left side of the virtual screen. (A virtual screen is actually the bounding rectangle of ALL the monitors.)

77

(Win2000 and newer) Coordinates for the top of the virtual screen. (A virtual screen is actually the bounding rectangle of ALL the monitors.)

78

(Win2000 and newer) Width of the virtual screen, in pixels. (A virtual screen is actually the bounding rectangle of ALL the monitors.)

79

(Win2000 and newer) Height of the virtual screen, in pixels. (A virtual screen is actually the bounding rectangle of ALL the monitors.)

80

(Win2000 and newer) Number of display monitors on the desktop

81

(Win2000and newer ) Non-zero if all the display monitors have the same color format, zero otherwise.

 

 

There are a number of other request #'s which can be specified, but are of limited usefulness and therefore not documented here. Details on these can be obtained from Win32 programming references, available from Microsoft and others.

 

Example:

mouse = "NO"
If WinMetrics(19) == 1 Then mouse = "YES"
Message("Is there a mouse installed?", mouse)

See Also:

Environment, MouseInfo, WinSysInfo, NetInfo, SysParamInfo, WinResources