Create a user textbox (in a Windows form)

  • Thread starter Thread starter Gilbert Tordeur
  • Start date Start date
G

Gilbert Tordeur

How can I create a new control, let's say a text box with a fixed size and
the code to check a valid date is entered, and then insert this new control
in the tool box ? Thank you.
 
Create a user control

* From your project name in Solution Explorer Right-Click, and choose Add
New Item, Choose 'User Control'

* Drag a Text box to the design page

* Double Click on the TextBox, and then choose the validate event from the
list of events

* Put your validation code in here.

* Once you are happy with it, Save and close your control, then Choose Build
| Build 'MyProjectName'

* Notice from the My Controls Tab on the ToolBox you will see your control
appear, you can drag this to your form for use.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top