J
Jack Fox
Under VB6 it was easy to prevent a non-numeric (or any kind of character)
keystroke in the KeyPress event of a TextBox, becasue you could simply set
the KeyAscii parameter to zero. The .Net Framework does not work like this.
I have found sample code to clear the entire textbox, but preventing
unwanted characters on a keystroke by keystroke basis is much more user
friendly. There must be a simple technique to do this, I just don't know
what it is.
keystroke in the KeyPress event of a TextBox, becasue you could simply set
the KeyAscii parameter to zero. The .Net Framework does not work like this.
I have found sample code to clear the entire textbox, but preventing
unwanted characters on a keystroke by keystroke basis is much more user
friendly. There must be a simple technique to do this, I just don't know
what it is.