Results 1 to 4 of 4

Thread: Keypress event

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176

    Keypress event

    how do i detect what key is beeing pressed? it aint KeyAscii anymore like in VB6....

  2. #2
    pvb
    Guest
    VB Code:
    1. Private Sub TextBox1_KeyPress(ByVal sender As Object, _
    2.     ByVal e As System.Windows.Forms.KeyPressEventArgs) _
    3.     Handles TextBox1.KeyPress
    4.  
    5.     MessageBox.Show("You Pressed: " & e.KeyChar.ToString)
    6.  
    7. End Sub

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    thnx, exactly like i needed it!

  4. #4
    Member
    Join Date
    May 2001
    Posts
    57

    Combobox problem with keypress

    Richard:

    I've tried your method with the textbox, i've found out that the .handled thing is quite useful in telling whether the keys are supposed to be processed by the system or not, however, when i implement the same idea in the combobox, such as .handled = false or true it does nothing at all, is this a bug?

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