加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

vb 锁定鼠标到某一位置

发布时间:2020-12-16 23:12:46 所属栏目:大数据 来源:网络整理
导读:Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long Private Type RECT Left As Long Top As Long Right As Long Bottom As Long End Type Private Sub Command1_Click() '锁定鼠标 到某一位置 Dim r As RECT r.Left = 100: r.Top =

Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long

Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Private Sub Command1_Click() '锁定鼠标 到某一位置
Dim r As RECT
r.Left = 100: r.Top = 100
r.Right = 100: r.Bottom = 100
ClipCursor r
End Sub

Private Sub Command2_Click() '解除锁定
ClipCursor ByVal 0&
End Sub

'原帖地址:

http://fy5388.blog.163.com/blog/static/5649953720091127115554104/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读