By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,054 Members | 1,327 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,054 IT Pros & Developers. It's quick & easy.

Problem in inherited form (VS.Net 2010, WinForms).

P: 79
I built a ClassLibrary where I have created my custom form component (let's say MyForm) that inherits from the Form class. I added the ClassLibrary to my actual WinForms project. Now when I add an inherited form based on MyForm to my project through the 'Add New Item' dialog box for the first time, its Text property remains blank by default. But when you add a standard form to a project, its Text is set to its Name by default. This is what my requirement is. I even tried to set the Text property in MyForm's constructor, yet it isn't working. How to solve this?
Aug 4 '12 #1
Share this Question
Share on Google+
1 Reply

P: 79
The naming of forms is done by the design IDE. It is not part of the Form Class. The IDE sets the name of a form to its text by default when it is created from the 'Add New Item' dialog box. But it's not done in case of inherited forms. Seems I have to set a default text in MyForm's constructor.
Aug 25 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.