PDA

Click to See Complete Forum and Search --> : KeyEvents


vbzero
Apr 6th, 2002, 11:58 AM
In Visual Basic 6; Under the KeyPressEvent of a textbox:

Select Case KeyAscii

Case vbKey0 To vbKey9

KeyAscii = KeyAscii

Case Else

KeyAscii = 0

End Select

In C#????

e.KeyChar is read only

Any ideas?

thx!

Jop
Apr 6th, 2002, 01:25 PM
Setting the e.Handled = True will ignore the pressed Key