Mega Code Archive

 
Categories / VisualBasic Script / Data Type
 

Creating an Enum

Public Enum SystemMetrics        SM_MOUSEPRESENT = 19        SM_SWAPBUTTON = 23        SM_MOUSEWHEELPRESENT = 75     End Enum          Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As SystemMetrics) As Long Type RECT    Left As Long    Top As Long    Right As Long    Bottom As Long End Type Declare Function ClipCursor Lib "user32" (lpRect As RECT) As Long Sub Foo()    Dim rectClipArea As RECT    Dim lngRetVal As Long    With rectClipArea       .Top = 200       .Left = 100       .Bottom = 420       .Right = 280    End With    lngRetVal = ClipCursor(rectClipArea) End Sub