Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replace Base Class of Textboxes on Form With My User Control

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
VB.net Windows Forms. I want to replace all of the textboxes on my form with a user control I have created. Is there a proper (easy) way to replace the base class of textboxes on my form with my user control without having to place the new control on the form and removing the original? Can I simply open the designer files and manually change them to the new class?

Auguy
Sylvania/Toledo Ohio
 
You should be able to do a search & replace, and change "As Textbox" to "As <YourControlType>". Then rebuild and it should be good to go.

Of course, make a backup of the entire project before you do this.

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Thanks, I tried that, must have done something wrong. I will try again.

Auguy
Sylvania/Toledo Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top