New form based on standard form

I want to create a new base-form which inherits from the standard Windows form. I want to add some properties to the new form. For example: a standard form has a property tag and I want my form to have multiple tag properties like tag1, tag2 etc.
The new class should be saved in a dll and new forms have to be instantiated from my new class.

Thanks in advance.


Answer this question

New form based on standard form

  • Brian Kitt

    I know I can inherit from System.Windows.Forms.Form but I want to save my inerited form in a dll and use it as a new template on which I can build new instances.
  • OZ83

    Create a new Class project, define the inherited form, and compile the class as a DLL.  Now you can add a reference to that class in any project and create instances of your custom form.
  • hvande

    You can just create a class file or an inherited form.  I'm not sure what exactly is the problem.  

    just change the inherits from System.Windows.Forms.Form to YourNamespace.YourFormTemplate, and it should work fine.

  • New form based on standard form