作者:岁月静好198838 | 来源:互联网 | 2023-07-15 09:40
一,屏蔽特殊键CTRL,ALT,DEL[quote]屏蔽特殊键PrivateDeclareFunctionSystemParametersInfoLibuser32Alias
一,屏蔽特殊键CTRL,ALT,DEL
[quote]
'屏蔽特殊键
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByRef lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Const MOD_ALT = &H1
Private Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As Long, ByVal id As Long, ByVal fsModifiers As Long, ByVal vk As Long) As Long
'以独占方式打开任务器,以达到禁止任务管理器的目的,或重命名该文件[包括备份目录下同名文件]
Shell "taskkill /f /im taskmgr.exe"
Open Environ("windir") & "/system32" & "/taskmgr.exe" For Random Lock Read As #1
'屏蔽特殊键
SystemParametersInfo 97, 1, 0, 0
'恢复过程略
[/quote]
屏蔽输入。
[quote]
'具体的键码,请查看相应的代号...
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
Dim keyascii As Integer = Asc(e.KeyChar)
Select Case keyascii
Case Is <32
...
Case 65 To 90
...
Case 97 To 122
...
Case Else
keyascii = 0
MessageBox.Show("登陆名,只能是英文字符!--谢谢合作!", "人事管理系统--信息提示!", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Select
End Sub
[/quote]
二,屏蔽任务管理器[CTRL+ALT+DEL组合键等]
为了防止再次打开任务管理器,我们先以独占方式将taskkill.exe打开,解锁时候关闭该进程即可
补充[转]:
有些用户安装迷你版的VB6后再使用不是迷你版附带的控件(如mswinsck.ocx)时可能会出现:
“该部件的许可证信息没有找到,在设计环境中,没有合适的许可证使用该功能”
下载本软件解压到某一目录下之后运行VBC6.exe就可以了。
下载链接:http://blog.cnii.com.cn/?92337/viewspace-15802.html