home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "dwMetrics"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = True
- Option Explicit
-
- ' Class dwMetrics
- ' System Metrics class
- ' Copyright (c) 1996 by Desaware Inc.
- ' Part of the Desaware API Classes Library
-
- ' GetSystemMetrics() codes
- Private Const SM_CXSCREEN = 0
- Private Const SM_CYSCREEN = 1
- Private Const SM_CXVSCROLL = 2
- Private Const SM_CYHSCROLL = 3
- Private Const SM_CYCAPTION = 4
- Private Const SM_CXBORDER = 5
- Private Const SM_CYBORDER = 6
- Private Const SM_CXDLGFRAME = 7
- Private Const SM_CYDLGFRAME = 8
- Private Const SM_CYVTHUMB = 9
- Private Const SM_CXHTHUMB = 10
- Private Const SM_CXICON = 11
- Private Const SM_CYICON = 12
- Private Const SM_CXCURSOR = 13
- Private Const SM_CYCURSOR = 14
- Private Const SM_CYMENU = 15
- Private Const SM_CXFULLSCREEN = 16
- Private Const SM_CYFULLSCREEN = 17
- Private Const SM_CYKANJIWINDOW = 18
- Private Const SM_MOUSEPRESENT = 19
- Private Const SM_CYVSCROLL = 20
- Private Const SM_CXHSCROLL = 21
- Private Const SM_DEBUG = 22
- Private Const SM_SWAPBUTTON = 23
- Private Const SM_RESERVED1 = 24
- Private Const SM_RESERVED2 = 25
- Private Const SM_RESERVED3 = 26
- Private Const SM_RESERVED4 = 27
- Private Const SM_CXMIN = 28
- Private Const SM_CYMIN = 29
- Private Const SM_CXSIZE = 30
- Private Const SM_CYSIZE = 31
- Private Const SM_CXFRAME = 32
- Private Const SM_CYFRAME = 33
- Private Const SM_CXMINTRACK = 34
- Private Const SM_CYMINTRACK = 35
- Private Const SM_CXDOUBLECLK = 36
- Private Const SM_CYDOUBLECLK = 37
- Private Const SM_CXICONSPACING = 38
- Private Const SM_CYICONSPACING = 39
- Private Const SM_MENUDROPALIGNMENT = 40
- Private Const SM_PENWINDOWS = 41
- Private Const SM_DBCSENABLED = 42
- Private Const SM_CMOUSEBUTTONS = 43
- Private Const SM_CMETRICS = 44
- Private Const SM_ARRANGE = 56
- Private Const SM_CLEANBOOT = 67
- Private Const SM_CXDRAG = 68
- Private Const SM_CXEDGE = 45
- Private Const SM_CXFIXEDFRAME = SM_CXDLGFRAME
- Private Const SM_CXMAXIMIZED = 61
- Private Const SM_CXMAXTRACK = 59
- Private Const SM_CXMENUCHECK = 71
- Private Const SM_CXMENUSIZE = 54
- Private Const SM_CXMINIMIZED = 57
- Private Const SM_CXMINSPACING = 47
- Private Const SM_CXSIZEFRAME = SM_CXFRAME
- Private Const SM_CXSMICON = 49
- Private Const SM_CXSMSIZE = 52
- Private Const SM_CYDRAG = 69
- Private Const SM_CYEDGE = 46
- Private Const SM_CYFIXEDFRAME = SM_CYDLGFRAME
- Private Const SM_CYMAXIMIZED = 62
- Private Const SM_CYMAXTRACK = 60
- Private Const SM_CYMENUCHECK = 72
- Private Const SM_CYMENUSIZE = 55
- Private Const SM_CYMINIMIZED = 58
- Private Const SM_CYMINSPACING = 48
- Private Const SM_CYSIZEFRAME = SM_CYFRAME
- Private Const SM_CYSMCAPTION = 51
- Private Const SM_CYSMICON = 50
- Private Const SM_CYSMSIZE = 53
- Private Const SM_MIDEASTENABLED = 74
- Private Const SM_NETWORK = 63
- Private Const SM_SECURE = 44
- Private Const SM_SLOWMACHINE = 73
-
- #If Win32 Then
- Private Declare Function GetSystemMetrics& Lib "user32" (ByVal nIndex As Long)
- Attribute GetSystemMetrics.VB_HelpID = 2884
- Attribute GetSystemMetrics.VB_Description = "Help available in Visual Basic Programmer's Guide to Win32 API CD ROM"
- #Else
- Private Declare Function GetSystemMetrics% Lib "user" (ByVal nIndex%)
- #End If
-
-
- Public Property Get CXSCREEN() As Long
- CXSCREEN = GetSystemMetrics(SM_CXSCREEN)
- End Property
-
- Public Property Get CYSCREEN() As Long
- CYSCREEN = GetSystemMetrics(SM_CYSCREEN)
- End Property
-
- Public Property Get CXVSCROLL() As Long
- CXVSCROLL = GetSystemMetrics(SM_CXVSCROLL)
- End Property
-
- Public Property Get CYHSCROLL() As Long
- CYHSCROLL = GetSystemMetrics(SM_CYHSCROLL)
- End Property
-
- Public Property Get CYCAPTION() As Long
- CYCAPTION = GetSystemMetrics(SM_CYCAPTION)
- End Property
-
- Public Property Get CXBORDER() As Long
- CXBORDER = GetSystemMetrics(SM_CXBORDER)
- End Property
-
- Public Property Get CYBORDER() As Long
- CYBORDER = GetSystemMetrics(SM_CYBORDER)
- End Property
-
- Public Property Get CXDLGFRAME() As Long
- CXDLGFRAME = GetSystemMetrics(SM_CXDLGFRAME)
- End Property
-
- Public Property Get CYDLGFRAME() As Long
- CYDLGFRAME = GetSystemMetrics(SM_CYDLGFRAME)
- End Property
-
- Public Property Get CYVTHUMB() As Long
- CYVTHUMB = GetSystemMetrics(SM_CYVTHUMB)
- End Property
-
- Public Property Get CXHTHUMB() As Long
- CXHTHUMB = GetSystemMetrics(SM_CXHTHUMB)
- End Property
-
- Public Property Get CXICON() As Long
- CXICON = GetSystemMetrics(SM_CXICON)
- End Property
-
- Public Property Get CYICON() As Long
- CYICON = GetSystemMetrics(SM_CYICON)
- End Property
-
- Public Property Get CXCURSOR() As Long
- CXCURSOR = GetSystemMetrics(SM_CXCURSOR)
- End Property
-
- Public Property Get CYCURSOR() As Long
- CYCURSOR = GetSystemMetrics(SM_CYCURSOR)
- End Property
-
- Public Property Get CYMENU() As Long
- CYMENU = GetSystemMetrics(SM_CYMENU)
- End Property
-
- Public Property Get CXFULLSCREEN() As Long
- CXFULLSCREEN = GetSystemMetrics(SM_CXFULLSCREEN)
- End Property
-
- Public Property Get CYFULLSCREEN() As Long
- CYFULLSCREEN = GetSystemMetrics(SM_CYFULLSCREEN)
- End Property
-
- Public Property Get CYKANJIWINDOW() As Long
- CYKANJIWINDOW = GetSystemMetrics(SM_CYKANJIWINDOW)
- End Property
-
- Public Property Get MOUSEPRESENT() As Long
- MOUSEPRESENT = GetSystemMetrics(SM_MOUSEPRESENT)
- End Property
-
- Public Property Get CYVSCROLL() As Long
- CYVSCROLL = GetSystemMetrics(SM_CYVSCROLL)
- End Property
-
- Public Property Get CXHSCROLL() As Long
- CXHSCROLL = GetSystemMetrics(SM_CXHSCROLL)
- End Property
-
- Public Property Get DEBUGAPI() As Long
- DEBUGAPI = GetSystemMetrics(SM_DEBUG)
- End Property
-
- Public Property Get SWAPBUTTON() As Long
- SWAPBUTTON = GetSystemMetrics(SM_SWAPBUTTON)
- End Property
-
- Public Property Get CXMIN() As Long
- CXMIN = GetSystemMetrics(SM_CXMIN)
- End Property
-
- Public Property Get CYMIN() As Long
- CYMIN = GetSystemMetrics(SM_CYMIN)
- End Property
-
- Public Property Get CXSIZE() As Long
- CXSIZE = GetSystemMetrics(SM_CXSIZE)
- End Property
-
- Public Property Get CYSIZE() As Long
- CYSIZE = GetSystemMetrics(SM_CYSIZE)
- End Property
-
- Public Property Get CXFRAME() As Long
- CXFRAME = GetSystemMetrics(SM_CXFRAME)
- End Property
-
- Public Property Get CYFRAME() As Long
- CYFRAME = GetSystemMetrics(SM_CYFRAME)
- End Property
-
- Public Property Get CXMINTRACK() As Long
- CXMINTRACK = GetSystemMetrics(SM_CXMINTRACK)
- End Property
-
- Public Property Get CYMINTRACK() As Long
- CYMINTRACK = GetSystemMetrics(SM_CYMINTRACK)
- End Property
-
- Public Property Get CXDOUBLECLK() As Long
- CXDOUBLECLK = GetSystemMetrics(SM_CXDOUBLECLK)
- End Property
-
- Public Property Get CYDOUBLECLK() As Long
- CYDOUBLECLK = GetSystemMetrics(SM_CYDOUBLECLK)
- End Property
-
- Public Property Get CXICONSPACING() As Long
- CXICONSPACING = GetSystemMetrics(SM_CXICONSPACING)
- End Property
-
- Public Property Get CYICONSPACING() As Long
- CYICONSPACING = GetSystemMetrics(SM_CYICONSPACING)
- End Property
-
- Public Property Get MENUDROPALIGNMENT() As Long
- MENUDROPALIGNMENT = GetSystemMetrics(SM_MENUDROPALIGNMENT)
- End Property
-
- Public Property Get PENWINDOWS() As Long
- PENWINDOWS = GetSystemMetrics(SM_PENWINDOWS)
- End Property
-
- Public Property Get DBCSENABLED() As Long
- DBCSENABLED = GetSystemMetrics(SM_DBCSENABLED)
- End Property
-
- Public Property Get CMOUSEBUTTONS() As Long
- CMOUSEBUTTONS = GetSystemMetrics(SM_CMOUSEBUTTONS)
- End Property
-
- Public Property Get CMETRICS() As Long
- CMETRICS = GetSystemMetrics(SM_CMETRICS)
- End Property
-
- Public Property Get ARRANGE() As Long
- ARRANGE = GetSystemMetrics(SM_ARRANGE)
- End Property
-
- Public Property Get CLEANBOOT() As Long
- CLEANBOOT = GetSystemMetrics(SM_CLEANBOOT)
- End Property
-
- Public Property Get CXDRAG() As Long
- CXDRAG = GetSystemMetrics(SM_CXDRAG)
- End Property
-
- Public Property Get CXEDGE() As Long
- CXEDGE = GetSystemMetrics(SM_CXEDGE)
- End Property
-
- Public Property Get CXFIXEDFRAME() As Long
- CXFIXEDFRAME = GetSystemMetrics(SM_CXFIXEDFRAME)
- End Property
-
- Public Property Get CXMAXIMIZED() As Long
- CXMAXIMIZED = GetSystemMetrics(SM_CXMAXIMIZED)
- End Property
-
- Public Property Get CXMAXTRACK() As Long
- CXMAXTRACK = GetSystemMetrics(SM_CXMAXTRACK)
- End Property
-
- Public Property Get CXMENUCHECK() As Long
- CXMENUCHECK = GetSystemMetrics(SM_CXMENUCHECK)
- End Property
-
- Public Property Get CXMENUSIZE() As Long
- CXMENUSIZE = GetSystemMetrics(SM_CXMENUSIZE)
- End Property
-
- Public Property Get CXMINIMIZED() As Long
- CXMINIMIZED = GetSystemMetrics(SM_CXMINIMIZED)
- End Property
-
- Public Property Get CXMINSPACING() As Long
- CXMINSPACING = GetSystemMetrics(SM_CXMINSPACING)
- End Property
-
- Public Property Get CXSIZEFRAME() As Long
- CXSIZEFRAME = GetSystemMetrics(SM_CXSIZEFRAME)
- End Property
-
- Public Property Get CXSMICON() As Long
- CXSMICON = GetSystemMetrics(SM_CXSMICON)
- End Property
-
- Public Property Get CXSMSIZE() As Long
- CXSMSIZE = GetSystemMetrics(SM_CXSMSIZE)
- End Property
-
- Public Property Get CYDRAG() As Long
- CYDRAG = GetSystemMetrics(SM_CYDRAG)
- End Property
-
- Public Property Get CYEDGE() As Long
- CYEDGE = GetSystemMetrics(SM_CYEDGE)
- End Property
-
- Public Property Get CYFIXEDFRAME() As Long
- CYFIXEDFRAME = GetSystemMetrics(SM_CYFIXEDFRAME)
- End Property
-
- Public Property Get CYMAXIMIZED() As Long
- CYMAXIMIZED = GetSystemMetrics(SM_CYMAXIMIZED)
- End Property
-
- Public Property Get CYMAXTRACK() As Long
- CYMAXTRACK = GetSystemMetrics(SM_CYMAXTRACK)
- End Property
-
- Public Property Get CYMENUCHECK() As Long
- CYMENUCHECK = GetSystemMetrics(SM_CYMENUCHECK)
- End Property
-
- Public Property Get CYMENUSIZE() As Long
- CYMENUSIZE = GetSystemMetrics(SM_CYMENUSIZE)
- End Property
-
- Public Property Get CYMINIMIZED() As Long
- CYMINIMIZED = GetSystemMetrics(SM_CYMINIMIZED)
- End Property
-
- Public Property Get CYMINSPACING() As Long
- CYMINSPACING = GetSystemMetrics(SM_CYMINSPACING)
- End Property
-
- Public Property Get CYSIZEFRAME() As Long
- CYSIZEFRAME = GetSystemMetrics(SM_CYSIZEFRAME)
- End Property
-
- Public Property Get CYSMCAPTION() As Long
- CYSMCAPTION = GetSystemMetrics(SM_CYSMCAPTION)
- End Property
-
- Public Property Get CYSMICON() As Long
- CYSMICON = GetSystemMetrics(SM_CYSMICON)
- End Property
-
- Public Property Get CYSMSIZE() As Long
- CYSMSIZE = GetSystemMetrics(SM_CYSMSIZE)
- End Property
-
- Public Property Get MIDEASTENABLED() As Long
- MIDEASTENABLED = GetSystemMetrics(SM_MIDEASTENABLED)
- End Property
-
- Public Property Get NETWORK() As Long
- NETWORK = GetSystemMetrics(SM_NETWORK)
- End Property
-
- Public Property Get SECURE() As Long
- SECURE = GetSystemMetrics(SM_SECURE)
- End Property
-
- Public Property Get SLOWMACHINE() As Long
- SLOWMACHINE = GetSystemMetrics(SM_SLOWMACHINE)
- End Property
-