' 改注册表也行。 ' 下面的办法我试了,没有任何问题,在Windows XP + VB6下调试通过。 ' 单击Command1可以禁止Ctrl + Alt + Del键,单击Command2可以恢复。
Option Explicit Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long Private Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value. Private Const HKEY_CURRENT_USER = &H80000001 Private Const REG_DWORD = 4 ' 32-bit number Dim reg As Long
Private Sub Command1_Click() Dim dValue(3) As Byte dValue(0) = 1 dValue(1) = 0 dValue(2) = 0 dValue(3) = 0 RegSetValueEx reg, "DisableTaskMgr", 0, REG_DWORD, dValue(0), 4 End Sub
Private Sub Command2_Click() Dim dValue(3) As Byte dValue(0) = 0 dValue(1) = 0 dValue(2) = 0 dValue(3) = 0 RegSetValueEx reg, "DisableTaskMgr", 0, REG_DWORD, dValue(0), 4 End Sub
Private Sub Form_Load() RegCreateKey HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", reg End Sub
或
在http://www.vckbase.com/document/finddoc.asp?keyword=gina ,有VC6的例子,
GINA在WIN2000,XP,WIN2003下通用
' 下面的办法我试了,没有任何问题,在Windows XP + VB6下调试通过。
' 单击Command1可以禁止Ctrl + Alt + Del键,单击Command2可以恢复。
Option Explicit
Private Declare Function RegCreateKey Lib "advapi32.dll" Alias "RegCreateKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
Private Declare Function RegSetValue Lib "advapi32.dll" Alias "RegSetValueA" (ByVal hKey As Long, ByVal lpSubKey As String, ByVal dwType As Long, ByVal lpData As String, ByVal cbData As Long) As Long
Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal dwType As Long, lpData As Any, ByVal cbData As Long) As Long ' Note that if you declare the lpData parameter as String, you must pass it By Value.
Private Const HKEY_CURRENT_USER = &H80000001
Private Const REG_DWORD = 4 ' 32-bit number
Dim reg As Long
Private Sub Command1_Click()
Dim dValue(3) As Byte
dValue(0) = 1
dValue(1) = 0
dValue(2) = 0
dValue(3) = 0
RegSetValueEx reg, "DisableTaskMgr", 0, REG_DWORD, dValue(0), 4
End Sub
Private Sub Command2_Click()
Dim dValue(3) As Byte
dValue(0) = 0
dValue(1) = 0
dValue(2) = 0
dValue(3) = 0
RegSetValueEx reg, "DisableTaskMgr", 0, REG_DWORD, dValue(0), 4
End Sub
Private Sub Form_Load()
RegCreateKey HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\System", reg
End Sub
然后点击command2 解除