Подготовте проект, добавив в него форму. На форму поместите:
- Кнопку с именем Command1
- Кнопку с именем Command2
Добавте в форму:
Private Declare Function SystemParametersInfo Lib
"user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam _
As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
'Usage:
Private Sub Command1_Click()
Me.Caption ="disable"
'To disable Ctrl-Alt-Delete:
Call DisableCtrlAltDelete(True)
End Sub
Private Sub Command2_Click()
Me.Caption ="enable"
'To enable Ctrl-Alt-Delete:
Call DisableCtrlAltDelete(False)
End Sub