June 30, 2001

ButtonDown, ButtonUp, MouseClick, MouseDblClick – Simulate mouse activity

Private Declare Sub mouse_event Lib “user32” (ByVal dwFlags As Long, _ ByVal dx As Long, ByVal dy As Long, ByVal cbuttons As Long, _ ByVal dwExtraInfo As Long)Private Const MOUSEEVENTF_LEFTDOWN = &H2Private Const MOUSEEVENTF_LEFTUP = &H4Private Const MOUSEEVENTF_MIDDLEDOWN = &H20Private Const MOUSEEVENTF_MIDDLEUP = &H40Private Const MOUSEEVENTF_RIGHTDOWN = &H8Private Const MOUSEEVENTF_RIGHTUP

DrawBorder – Draw a raised/bump/etched/sunken border

Option ExplicitPrivate Type RECT Left As Long Top As Long Right As Long Bottom As LongEnd TypePrivate Enum mbBorderTypeConstants mbRaised = 0 mbSunken = 1 mbEtched = 2 mbBump = 3End Enum’draw a raised/bump/etched/sunken border at given coordinatesPrivate Sub DrawBorder(Target As Object, rcBorder As RECT, _ Optional ByVal BorderType As

CConsole – A class for creating console applications

‘ CCONSOLE Class” Creates a console window and writes to it’ Example:’ Dim cons As New CConsole’ cons.WriteString “Hello World”Private Declare Function AllocConsole Lib “kernel32” () As LongPrivate Declare Function FreeConsole Lib “kernel32” () As LongPrivate Declare Function CloseHandle Lib “kernel32” (ByVal hObject As Long) As _ LongPrivate Declare Function

ShowIcon – Extract an icon from a file and show it

Private Declare Function ExtractIcon Lib “shell32.dll” Alias “ExtractIconA” _ (ByVal hInst As Long, ByVal lpszExeFileName As String, _ ByVal nIconIndex As Long) As LongPrivate Declare Function DrawIcon Lib “user32” (ByVal hDC As Long, _ ByVal X As Long, ByVal Y As Long, ByVal hIcon As Long) As Long’ Extract an

Display the Windows Shortcut Wizard

You can programmatically start the Shortcut Wizard from your code, to give the end user the capability to create a new shortcut: Shell “rundll32.exe AppWiz.Cpl, NewLinkHere ” & App.Path, 1