PDA

Click to See Complete Forum and Search --> : Detecting if Ctrl+Alt+Del is pressed...


chrisjk
Jan 22nd, 2000, 12:48 AM
Declarations

Copy this code into the declarations section of your project.


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)


Regards,

------------------
- Chris
chris.kilhams@btinternet.com
If it ain't broke - don't fix it :)


[This message has been edited by chrisjk (edited 01-22-2000).]

David Richardson
Jan 22nd, 2000, 03:50 AM
Thanks, but I know how to disable Cntrl+alt+del!

What I need is a way of DETECTING if the keys are pressed together, WHILE they are disabled! Understand?

Cheers :)

David Richardson

chrisjk
Jan 22nd, 2000, 09:45 AM
Sorry, I thought you wanted to detect when CTRL+DEL+ALT were pressed, so you could intercept and disable it.

You have to use system-wide SendKeys, otherwise known as some API function(s). Ask the API gurus here - they should be able to help.

Regards,

------------------
- Chris
chris.kilhams@btinternet.com
If it ain't broke - don't fix it :)

David Richardson
Jan 22nd, 2000, 11:48 AM
I'm writing an app which disables Ctrl+Alt+Del. What I need is a way of detecting if the user presses these keys while they're disabled. Can anyone help?

Thanks :)

David Richardson

David Richardson
Jan 22nd, 2000, 08:04 PM
Thanks Chris :) Can anyone shed any light on the appropriate API's to use for detecting when the Ctrl+Alt+Del keys are pressed WHILE they are DISABLED? Any help appreciated. Cheers :)

David Richardson