Enable And Disable The Ctrl-Alt-Del

'Add a module to your project (In the menu choose Project -> Add Module, Then click Open)
'Insert 2 CommandButtons to your form (named Command1 and Command2)
'When you will press the first button, you will disable the Ctrl-Alt-Del
'and when you will press the second button you will enable the Ctrl-Alt-Del

'Insert this code to the module :

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

'Insert this code to your form:

Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim x As Long
x = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub

Private Sub Command2_Click()
DisableCtrlAltDelete (False)
End Sub

Private Sub Command1_Click()
DisableCtrlAltDelete (True)
End Sub

Go Back