Results 1 to 2 of 2

Thread: [02/03] Handling Keyboard events

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2006
    Posts
    29

    Arrow [02/03] Handling Keyboard events

    In vb.net i can handle keyboard events by handling mybase.keydown
    This works if the user presses one button on the keyboard.

    How can i handle many buttons at a time like CTRL-ALT-X??

    Thanks

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: [02/03] Handling Keyboard events

    The 'e' parameter has Boolean properties indicating the state of the Ctrl, Shift and Alt keys.
    VB Code:
    1. If e.KeyCode = Keys.X AndAlso e.Control AndAlso e.Alt AndAlso Not e.Shift Then
    2.     MessageBox.Show("You pressed Ctrl+Alt+X".)
    3. End If
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

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