Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Private Type RECT@H_301_3@ Left As Long@H_301_3@ Top As Long@H_301_3@ Right As Long@H_301_3@ Bottom As Long@H_301_3@End Type
Private Sub Command1_Click() '锁定鼠标 到某一位置@H_301_3@ Dim r As RECT@H_301_3@ r.Left = 100: r.Top = 100@H_301_3@ r.Right = 100: r.Bottom = 100@H_301_3@ ClipCursor r@H_301_3@End Sub
Private Sub Command2_Click() '解除锁定@H_301_3@ ClipCursor ByVal 0&@H_301_3@End Sub
'原帖地址:
http://fy5388.blog.163.com/blog/static/5649953720091127115554104/