Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Sub cmdClip()
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
Private Sub cmdUnclip()
Dim lngRetVal As Long
lngRetVal = ClipCursor(ByVal 0&)
End Sub
|