This simple code shows you how to disable/enable the "ctrl, alt, del" keys so the user cannot quite the program which is currently running..
I have created a sub. Use the true statement if you want to disable the keys like thia:
a = disablekeys (true)
use the false statement if you want to enable the keys like this:
a = disablekeys (false)
Place two commandbuttons on the form and name them "enablek", disablek"
Now add the following 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
Private Sub disablekeys(disable As Boolean)
SystemParametersInfo 97, disable, CStr(1), 0
End Sub
Private Sub disablek_Click()
disablekeys True
End Sub
Private Sub enablek_Click()
disablekeys False
End Sub
Comments