VALIDATING TEXT BOX DOES NOT WORK
-
hi all i am trying to validate a text box entry. i want to enter hex data in the text box. so in the keyDown event of the textbox if the user presses an invalid key i say e.Handled=true. but still the keypressed appears in the text box. private void textBox1_KeyDown(object sender,System.Windows.Forms.KeyEventArgs e) { if(e.KeyValue==65) { e.Handled=true; } } this was the sample code i was trying to disable typing of 'a' can any one help me????
-
hi all i am trying to validate a text box entry. i want to enter hex data in the text box. so in the keyDown event of the textbox if the user presses an invalid key i say e.Handled=true. but still the keypressed appears in the text box. private void textBox1_KeyDown(object sender,System.Windows.Forms.KeyEventArgs e) { if(e.KeyValue==65) { e.Handled=true; } } this was the sample code i was trying to disable typing of 'a' can any one help me????
Key off of the KeyPress event rather than the KeyDown event. Darryl Borden Principal IT Analyst dborden@eprod.com
-
Key off of the KeyPress event rather than the KeyDown event. Darryl Borden Principal IT Analyst dborden@eprod.com
-
There is no "key off" event. Use the "KeyPress" event - not the "KeyDown" event Darryl Borden Principal IT Analyst dborden@eprod.com