我想做个屏幕锁...
但我想锁定键盘上的TAB切换键还有CTRL和ALT和SHIFT组合键以及WINDOWS键,就是如果用户按了键盘上这些键时无反映..
不知道怎么编写..请求帮忙哦...
我想做个屏幕锁...
但我想锁定键盘上的TAB切换键还有CTRL和ALT和SHIFT组合键以及WINDOWS键,就是如果用户按了键盘上这些键时无反映..
不知道怎么编写..请求帮忙哦...
修改注册表,禁止任务管理器
截取键击事件 判定是系统功能键就把keycode设成0
这样根本不行,要想屏蔽只能使用API函数
Private Declare Function SystemParametersInfo Lib "user32" _
Alias "SystemParametersInfoA" (ByVal uAction As Long, _
ByVal uParam As Long, lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Private Const SPI_SCREENSAVERRUNNING = 97
Private Sub Command1_Click()
Dim ret As Integer
Dim pOld As Boolean
If Command1.Caption = "屏蔽" Then '使Ctrl+Alt+Del有效
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
Command1.Caption = "有效"
Else '使Ctrl+Alt+Del无效
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
Command1.Caption = "屏蔽"
End If
End Sub
Private Sub Form_Load()
Command1.Caption = "屏蔽"
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim ret As Integer
Dim pOld As Boolean
'退出前使ALT+CTL+DEL有效
ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
End Sub
谢谢斑竹..
不过貌似在WINXP环境下无效..经过测试了...
网上说这个只适用于WIN9X...
不知道要怎么改..