Detecting "Alt"+"Ctrl"+"Del" Key press
hi ,
This a code from MSDN, if u don't have access to MSDN use this
In the Microsoft Knowledge Base:
HOWTO: Block CTRL+ALT+DEL and ALT+TAB in Windows 95
Article ID: Q161133
Note that disabling CTRL+ALT+DEL is not recommended because the Close Program
dialog box was created to enable users to terminate misbehaving applications. If
a program "hangs" while CTRL+ALT+DEL is disabled, it may not be possible to
terminate it by any method other than rebooting the machine, which could result
in the loss of data. Also, this technique may not work in future versions of
Windows.
1.Step-by-Step Example
2.Start a new Standard EXE project. Form1 is created by default.
3.Add two CommandButton controls (Command1 and Command2) to Form1.
4.Add the following code to Form1's General Declarations section:
Private Const SPI_SCREENSAVERRUNNING = 97&
Private Declare Function SystemParametersInfo Lib "User32" _
Alias "SystemParametersInfoA" _
(ByVal uAction As Long, _
ByVal uParam As Long, _
lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Private Sub Form_Load()
Command1.Caption = "Disabled"
Command2.Caption = "Enabled"
End Sub
Private Sub Form_Unload(Cancel As Integer)
'Re-enable CTRL+ALT+DEL and ALT+TAB before the program terminates.
Command2_Click
End Sub
Private Sub Command1_Click()
Dim lngRet As Long
Dim blnOld As Boolean
lngRet = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, _
blnOld, _
0&)
End Sub
Private Sub Command2_Click()
Dim lngRet As Long
Dim blnOld As Boolean
lngRet = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, _
blnOld, _
0&)
End Sub
5.Press the F5 key to run the program, and click the "Disabled" CommandButton.
CTRL+ALT+DEL and ALT+TAB are disabled. Click the "Enabled" CommandButton to
enable CTRL+ALT+DEL and ALT+TAB again.
Quote:
> Hi, how can I disable the "Alt"+"Ctrl"+"Del" Key press which will bring up
> the task manager and allow the user to terminate a program. I appreciate any
> advice. Thanks
> - Dan W