Results 1 to 5 of 5

Thread: Detecting if Ctrl+Alt+Del is pressed...

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    Declarations

    Copy this code into the declarations section of your project.

    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
    Code

    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:

    Code:
    Call DisableCtrlAltDelete(True)
    To enable Ctrl-Alt-Delete:

    Code:
    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).]

  2. #2
    Junior Member
    Join Date
    Jan 2000
    Location
    wrrj
    Posts
    26

    Post

    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

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    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

  4. #4
    Junior Member
    Join Date
    Jan 2000
    Location
    wrrj
    Posts
    26

    Post

    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

  5. #5
    Junior Member
    Join Date
    Jan 2000
    Location
    wrrj
    Posts
    26

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width