What is the code to allow only text to be inputted into a text box
Also what would be the could to only allow numeric values, and another to allow only dates (dd/mm/yyyy)
Any help appreciated.
What is the code to allow only text to be inputted into a text box
Allow Only Text Input
Tone Southerland
AeQuitaZ
hi,
you can use keypress event handler to get that ,
if not char.isnumber(e.keycode) or not e.keycode = '\' then
e.handle = true
messagebox.show("plz enter date only")
end if
you can use isletter in the other case
hope this helps
Blue Stone Post
http://msdn2.microsoft.com/en-us/library/system.windows.forms.control.keypress.aspx
and for the date try erither: MaskedTextBox, DateTimePicker control or the keypress event