1 Replies - 10305 Views - Last Post: 25 August 2012 - 09:15 AM

#1 priyamtheone  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 75
  • Joined: 02-September 08

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

Posted 04 August 2012 - 09:24 AM

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?

Is This A Good Question/Topic? 0
  • +

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

#2 priyamtheone  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 75
  • Joined: 02-September 08

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

Posted 25 August 2012 - 09:15 AM

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.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1