In Visual Basic 6; Under the KeyPressEvent of a textbox:
VB Code:
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!
Printable View
In Visual Basic 6; Under the KeyPressEvent of a textbox:
VB Code:
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!
Setting thewill ignore the pressed KeyVB Code:
e.Handled = True