I am trying to disable the AltTab command from my program, but can't figure anything out to do it, and there doesn't seem to be anything in VBworlds archives.
Printable View
I am trying to disable the AltTab command from my program, but can't figure anything out to do it, and there doesn't seem to be anything in VBworlds archives.
This code should disable all possible ways to escape (ctrl+alt+del, ctrl+esc, alt+tab, etc.):
Code: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
Private Sub CmdDisable_Click()
Call DisableCtrlAltDelete(True)
End Sub
Private Sub CmdEnabled_Click()
Call DisableCtrlAltDelete(False)
End Sub