Does anyone know how to disable the CTRL+ALT+DEL and the windows start menu key(keyboard) in VB??
Printable View
Does anyone know how to disable the CTRL+ALT+DEL and the windows start menu key(keyboard) in VB??
Aah this question has been asked LOADS of times! It's possible in VB to block Win9x (95,98,98SE,Me) CTRL-ALT-DEL and Windows system buttons but not in WinNT (NT/2000). Search in the forum for "CTRL-ALT-DEL" and you're sure to find the code :)
Here you go:
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
Private Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim x As Long
x = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Private Sub Command2_Click()
'Enable CtrlAltDelete
DisableCtrlAltDelete (False)
End Sub
Private Sub Command1_Click()
'Disable CtrlAltDelete
DisableCtrlAltDelete (True)
End Sub