How can I disable the windows function to task swapping. (ALT-TAB). I am trying to add some security to my app.
TIA
Printable View
How can I disable the windows function to task swapping. (ALT-TAB). I am trying to add some security to my app.
TIA
No, I don't know, but if you're not afraid of timers, you can always make your app to get active :)
Since the user could also press CTRL+ESC, ALT+SHIFT+TAB, hit the Windows key, or run TASKMAN.EXE (from the START menu) I think it would be wise to give up trying to do that and re-think your security strategy.
Personally I think programs that stop people using standard Windows control keys are a pain in the neck.
But hey, I guess that's just me...
I found the following if anyone is intrested.
Disabling Ctrl-Alt-Delete and Ctrl-Esc
It is often useful in Visual Basic programs to be able to disable the Ctrl-Alt-Delete key sequence. It is easily achieved by persuading Windows that a screen saver is running. This code also disables Ctrl-Esc, that is used to activate the Start Menu.
Declarations
Copy this code into the declarations section of a module.
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
Code
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Use
'To disable Ctrl-Alt-Delete:
Call DisableCtrlAltDelete(True)
'To enable Ctrl-Alt-Delete:
Call DisableCtrlAltDelete(False)