Results 1 to 5 of 5

Thread: Stop event?

  1. #1
    Join Date
    Aug 2004
    Posts
    82

    Unanswered: Stop event?

    Is there any command which has the same effect as javascripts: "return false;"... I'm basically trying to do the (from what i've seen) impossible by disabling CTRL+ALT+DEL etc etc by doing:

    Code:
    If KeyCode = vbKeyMenu Then
    MsgBox ("ALT Button Disabled")
    STOP THE PC RECEIVING THE COMMAND <ALT>
    End If
    Cheers guys!

  2. #2
    Join Date
    Aug 2004
    Location
    Pune,India
    Posts
    94
    i think you need to check the return value of MsgBox

    Use the Constant vbNo or something like that.

    Hope i've understood your problem.
    In GOD we believe. Everything else we Test!

  3. #3
    Join Date
    Aug 2004
    Location
    Pune,India
    Posts
    94
    If the code above is written inside some event handling routine,
    see if there is any argument called CANCEL. If it exists, set it to true. this will provide the same effect.


    Hope this helps.
    In GOD we believe. Everything else we Test!

  4. #4
    Join Date
    Aug 2004
    Posts
    82
    Thanks for your help but no I don't think is... here is the code:

    Code:
    Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
        If KeyCode = vbKeyMenu Then
        MsgBox ("ALT Button Disabled")
        End If
        
    End Sub
    If this isn't gonna work, if there any other way?


    Thanks again!

  5. #5
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    It's generally NOT a good idea to alter basic windows functionality. Especially disabling ctrl-alt-delete, as this leaves the user no away to exit a malicious or malfunctioning application.

    If you could tell us what you're trying to acomplish, maybe we could suggest an anternate approach.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

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