Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have a very simple ques?
How can I set a default integer value in a textbox, in window form.

Thanks
Posted

1 solution

If you are using integers only, then I wouldn't use a Textbox - it's far too easy for the user to mistype and enter data you have to check and report back to him on.

Why not use a NumericUpDown? It only allows numbers, and you can set a max and min value as well.

If you must use a TextBox, then just set the Text property in either the designer, or the form Load event.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900