home *** CD-ROM | disk | FTP | other *** search
- 'For more info... Blaine Leckett CIS: 73730,761
-
- 'Rectangle type
- Type CLIPRECT
- x1 As Integer
- y1 As Integer
- x2 As Integer
- y2 As Integer
- End Type
-
- ' Windows Clip Cursor Functions
- Declare Sub GetWindowRect Lib "User" (ByVal hWnd As Integer, lpRect As CLIPRECT)
- Declare Sub ClipCursorRect Lib "User" Alias "ClipCursor" (rect As CLIPRECT)
- Declare Sub ClipCursorClear Lib "User" Alias "ClipCursor" (ByVal rect&)
-
- Sub ClipMouseMovement ()
- Dim rect As CLIPRECT
-
- 'Get the corners of our clipping area (Picture1)
- GetWindowRect Form1.Picture1.hWnd, rect
-
- 'Restrict the mouse to our window (Picture1)
- ClipCursorRect rect
- End Sub
-
- Sub UnClipMouseMovement ()
- 'Frees mouse from inside the window (Picture1)
- ClipCursorClear 0
- End Sub
-
-