General Fear
Member
- Joined
- Dec 22, 2012
- Messages
- 12
- Programming Experience
- 10+
I am using VB.Net 2010.
I have 2 questions.
Suppose that I wanted to create one custom control like a textbox. In the textbox, it will have all the typical code you find in a desktop application. For example, I need a letter only textbox, numbers only textbox, this textbox can't be empty textbox etc etc . . .
1.) Can I do the above example where I put all the validation into a single custom control.
2.) Okay so if the above is possible, how do I associate the code in the custom control to the textbox on the form. If I drop a custom textbox control called txtZip, how do I get txtZip to use the validation code that checks for numbers only.
I have 2 questions.
Suppose that I wanted to create one custom control like a textbox. In the textbox, it will have all the typical code you find in a desktop application. For example, I need a letter only textbox, numbers only textbox, this textbox can't be empty textbox etc etc . . .
1.) Can I do the above example where I put all the validation into a single custom control.
2.) Okay so if the above is possible, how do I associate the code in the custom control to the textbox on the form. If I drop a custom textbox control called txtZip, how do I get txtZip to use the validation code that checks for numbers only.