Results 1 to 3 of 3

Thread: keypress or key down

  1. #1

    Thread Starter
    Fanatic Member VBKNIGHT's Avatar
    Join Date
    Oct 2000
    Location
    Port25
    Posts
    619

    keypress or key down

    how can i trap key press combination of ctr-alt-del key??

    If a post has helped you then Please Rate it!

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    What do you want to do, disable the use of Ctrl-Alt-Del? If so, this should do the trick:
    VB Code:
    1. Private Declare Function SystemParametersInfo Lib "user32" Alias _
    2. "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, _
    3. ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long
    4.  
    5.  
    6. Private Sub DisableCtrlAltDelete(bDisabled As Boolean)
    7. Dim x As Long
    8. x = SystemParametersInfo(97, bDisabled, CStr(1), 0)
    9. End Sub
    10.  
    11. Private Sub Command1_Click()
    12. DisableCtrlAltDelete (False)
    13. End Sub
    14.  
    15. Private Sub Command2_Click()
    16. DisableCtrlAltDelete (True)
    17. End Sub
    On the other hand, if this isn't what you want to do then give some more specifics and I'm sure we can work something out.

  3. #3

    Thread Starter
    Fanatic Member VBKNIGHT's Avatar
    Join Date
    Oct 2000
    Location
    Port25
    Posts
    619
    What I mean is to trap the event when the user presses the key combination of ctrll-alt-del and also the alt-tab.How would I know if they presses those keys.

    If a post has helped you then Please Rate it!

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