用VB实现按一下,把键盘和鼠标锁死
本人刚开始接触VB,不太懂,这是我的突发奇想,能教我怎么篇吗?要详细,因为我不太懂!不用第三方软件...
本人刚开始接触VB,不太懂,这是我的突发奇想,能教我怎么篇吗?要详细,因为我不太懂!
不用第三方软件 展开
不用第三方软件 展开
展开全部
'锁鼠标
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Sub Form_Load()
ShowCursor 0
Do
SetCursorPos 0, 5000
DoEvents
Loop
End Sub
'楼上的容易破解,Ctrl+Alt+Delete
Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Private Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Private Sub Form_Load()
ShowCursor 0
Do
SetCursorPos 0, 5000
DoEvents
Loop
End Sub
'楼上的容易破解,Ctrl+Alt+Delete
展开全部
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 a As RECT
With a
.Left = 500
.Right = 500
.Bottom = 600
.Top = 600
End With
ClipCursor a
End Sub
Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyQ Then
End
End If
End Sub
'这是锁定鼠标的
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Private Sub Command1_Click()
Dim a As RECT
With a
.Left = 500
.Right = 500
.Bottom = 600
.Top = 600
End With
ClipCursor a
End Sub
Private Sub Command1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyQ Then
End
End If
End Sub
'这是锁定鼠标的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
我知道你是用来干坏事的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询