Access Cookbook - Ken Getz [246]
' dynamic link libraries (DLLs)
' 3: Highest memory address accessible to applications and DLLs
' 4: Mask representing the set of processors configured into
' the system
' Bit 0 is processor 0; bit 31 is processor 31
' 5: Returns the number of processors in the system
' 6: Type of the current processors in the system
' 7: Allocation granularity in which memory will be allocated
' on (usually 64K)
' Out:
' Return Value: The requested information
Dim SI As SYSTEM_INFO
GetSystemInfo SI
Select Case intItem
Case 0
acbGetSystemStatus = SI.dwOemID
Case 1
acbGetSystemStatus = SI.dwPageSize
Case 2
acbGetSystemStatus = SI.lpMinimumApplicationAddress
Case 3
acbGetSystemStatus = SI.lpMaximumApplicationAddress
Case 4
acbGetSystemStatus = SI.dwActiveProcessorMask
Case 5
acbGetSystemStatus = SI.dwNumberOrfProcessors
Case 6
acbGetSystemStatus = SI.dwProcessorType
Case 7
acbGetSystemStatus = SI.dwAllocationGranularity
Case Else
acbGetSystemStatus = 0
End Select
End Function
Table 11-14. Subset of the options for GetSystemMetrics
Constant name
Value
Meaning
SM_CXSCREEN
0
Width of screen.
SM_CYSCREEN
1
Height of screen.
SM_CXVSCROLL
2
Width of arrow bitmap on a vertical scrollbar.
SM_CYHSCROLL
3
Height of arrow bitmap on a horizontal scrollbar.
SM_CYCAPTION
4
Height of window title. This is the title height plus the height of the window frame that cannot be sized ( SM_CYBORDER).
SM_CXBORDER
5
Width of window border.
SM_CYBORDER
6
Height of window border or dimensions of a single border, in pixels.
SM_CXFIXEDFRAME
7
Width of frame when window has the WS_DLGFRAME style.
SM_CYFIXEDFRAME
8
Height of frame when window has the WS_DLGFRAME style.
SM_CYVTHUMB
9
Height of scroll box on vertical scrollbar.
SM_CXHTHUMB
10
Width of scroll box (thumb) on horizontal scrollbar.
SM_CXICON
11
Width of icon.
SM_CYICON
12
Height of icon.
SM_CXCURSOR
13
Width of cursor.
SM_CYCURSOR
14
Height of cursor.
SM_CYMENU
15
Height of single-line menu bar.
SM_CXFULLSCREEN
16
Width of window client area for a full-screen window.
SM_CYFULLSCREEN
17
Height of window client area for a full-screen window (equivalent to the height of the screen minus the height of the window title).
SM_CYKANJIWINDOW
18
Height of Kanji window.
SM_MOUSEPRESENT
19
Nonzero if the mouse hardware is installed.
SM_CYVSCROLL
20
Height of arrow bitmap on a vertical scrollbar.
SM_CXHSCROLL
21
Width of arrow bitmap on a horizontal scrollbar.
SM_DEBUG
22
Nonzero if the Windows version is a debugging version.
SM_SWAPBUTTON
23
Nonzero if the left and right mouse buttons are swapped.
SM_CXMIN
28
Minimum width of window.
SM_CYMIN
29
Minimum height of window.
SM_CXSIZE
30
Width of bitmaps contained in the titlebar.
SM_CYSIZE
31
Height of bitmaps contained in the titlebar.
SM_CXFRAME
32
Width of window frame for a window that can be resized. (Obsolete; use SM_CXFIXEDFRAME instead.)
SM_CYFRAME
33
See SM_CXFRAME (height, instead). (Obsolete; use SM_CYFIXEDFRAME instead.)
SM_CXMINTRACK
34
Minimum tracking width of window.
SM_CYMINTRACK
35
Minimum tracking height of window.
SM_CXDOUBLECLK
36
Width of the rectangle around the location of the 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.
SM_CYDOUBLECLK
37
See SM_CXDOUBLECLK (height, instead).
SM_CXICONSPACING
38
Width of rectangles the system uses to position tiled icons.
SM_CYICONSPACING
39
Height of rectangles the system uses to position tiled icons.
SM_MENUDROPALIGNMENT
40
Alignment of pop-up menus. If this value is zero, the left side of a pop-up menu is aligned with the left side of the corresponding menu-bar item. If this value is nonzero, the left side of a pop-up menu is aligned with the right side of the corresponding menu-bar item.
SM_PENWINDOWS
41
Handle of the Pen Windows DLL if Pen Windows is installed.