Declare Function SystemParametersInfo Lib "user32" _
Alias "SystemParametersInfoA" (ByVal uAction As Long, _ ByVal uParam As Long, lpvParam As Any, _ ByVal fuWinIni As Long) As Long Public Const SPI_SCREENSAVERRUNNING = 97 Public Sub Disable_Ctrl_Alt_Del() 'Disables the Crtl+Alt+Del Dim AyW As Integer Dim TurFls As Boolean AwY = SystemParametersInfo(SPI_SCREENSAVERRUNNING, _ True, TurFls, 0) End Sub Public Sub Enable_Ctrl_Alt_Del() 'Enables the Crtl+Alt+Del Dim AwY As Integer Dim TurFls As Boolean AwY = SystemParametersInfo(SPI_SCREENSAVERRUNNING, _ False, TurFls, 0) End Sub Dim X X = MsgBox("Do you wish to disable CTRL+ALT+DEL?", 36, _ "Disable/Enable CTRL+ALT+DEL") If X = vbYes Then Disable_Ctrl_Alt_Del MsgBox "CTRL+ALT+DEL is disabled, try pressing " _ & "CTRL+ALT+DEL now.", , _ "Disable/Enable CTRL+ALT+DEL" Again: X = MsgBox("Enbale CTRL+ALT+DEL now?", 36, _ "Disable/Enable CTRL+ALT+DEL") If X = vbYes Then Enable_Ctrl_Alt_Del ElseIf X = vbNo Then MsgBox "The program will not End before CTRL+ALT+DEL " _ & " is enabled.", , "Disable/Enable CTRL+ALT+DEL" Goto Again End If End If This code disables/enabled CTRL+ALT+DEL pressing To disable CTRL+ALT+DEL, call the function Disable_CTRL_ALT_DEL To enabled CTRL+ALT+DEL, call the function Enable_CTRL_ALT_DEL Inputs: Example of use: Call Disable_Ctrl_Alt_Del() Then at another time: Call Enable_Ctrl_Alt_Del() Returns: Dissables / Enables CTRL + ALT + DEL You wont be able to use CTRL + ALT + DEL until you Enable it again, or restart your system. |