how do i detect what key is beeing pressed? it aint KeyAscii anymore like in VB6....
Printable View
how do i detect what key is beeing pressed? it aint KeyAscii anymore like in VB6....
VB Code:
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
thnx, exactly like i needed it!
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: