Click to See Complete Forum and Search --> : Keypress event
JpEgy
Mar 16th, 2002, 06:44 PM
how do i detect what key is beeing pressed? it aint KeyAscii anymore like in VB6....
pvb
Mar 16th, 2002, 07:18 PM
Private Sub TextBox1_KeyPress(ByVal sender As Object, _
ByVal e As System.Windows.Forms.KeyPressEventArgs) _
Handles TextBox1.KeyPress
MessageBox.Show("You Pressed: " & e.KeyChar.ToString)
End Sub
JpEgy
Mar 16th, 2002, 07:32 PM
thnx, exactly like i needed it!
Cestlavie
Mar 18th, 2002, 03:12 AM
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? :confused:
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.