Gagel Posted January 20, 2003 Posted January 20, 2003 (edited) In VB 6.0 I used the KeyPress-Event to change user inputs. E.g. when a textbox has the text "31.0" and the user hits the "2"-key, I changed the KeyAscii paramter to 0, because there is no 31th day in February. E.g. when I didnt want that the user is able to type in german letter (like ä, ö , ü). I just changed the KeyAscii to 0. In VB.net I am not able to change the e.Keycode paramter and in the KeyPress events the changes are already made. I think that I have to use the KeyDown method, but how can I change the Keycode? Edited January 20, 2003 by Gagel Quote
Moderators Robby Posted January 20, 2003 Moderators Posted January 20, 2003 You can use the Keypress to limit the input or compare the input... If Not e.KeyChar.(more methods here) Then you can also use the Validating event, and if you don't want to accept the input, you can... e.Cancel = True Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.