如何实现vb屏蔽所有键盘按键
沃编了一个简单的恶搞程序就是一小程序不可以被关闭(点红叉无效)但是发现XP下用任务管理器还是可以关掉于是把程序设置为全屏运行现在想在程序中屏蔽掉键盘(这样就调动不了管理器...
沃编了一个简单的恶搞程序 就是一小程序不可以被关闭(点红叉无效) 但是发现XP下用任务管理器还是可以关掉 于是把程序设置为全屏运行 现在想在程序中屏蔽掉键盘(这样就调动不了管理器了)在网络上找了很多 ....太混乱了 都用不了...什么hook钩子之类的程序只有一个form1和一个command1(全屏后红叉不见了,给个按键,按了反而关不了的) 谁可以帮我接手后续的编程呢?我可以发文件给你 谢谢啦
展开
1个回答
2013-11-25
展开全部
Public Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Sub Check4_Click()
If chkDisable.Value = 1 Then
If Check4.Value = 1 Then
Dim sTmp As String * 50
Dim abc, bcd As String
Length = GetSystemDirectory(sTmp, 50) '获取系统目录
abc = left(sTmp, Length)
bcd = abc & "\taskmgr.exe" '打开而不执行一个程序(任务管理器)
Open bcd For Input Lock Read Write As #305 '以达到锁定的目的
Else
Close #305
End If
Else
Close #305
End If
End Sub
Private Declare Function ClipCursor Lib "user32" (lpRect As Any) As Long
Declare Function SetWindowPos& Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Sub Check4_Click()
If chkDisable.Value = 1 Then
If Check4.Value = 1 Then
Dim sTmp As String * 50
Dim abc, bcd As String
Length = GetSystemDirectory(sTmp, 50) '获取系统目录
abc = left(sTmp, Length)
bcd = abc & "\taskmgr.exe" '打开而不执行一个程序(任务管理器)
Open bcd For Input Lock Read Write As #305 '以达到锁定的目的
Else
Close #305
End If
Else
Close #305
End If
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询