none
Share forms between projects? RRS feed

  • Question

  • Hi, I've recently noticed that a solution can contain multiple projects. I'd like to know if I can create a form that exists in multiple projects, so i can edit one form (or class) instead of six, and have it published in each one of them separately? I hope that makes sense....
    I seek not answers, but understanding, that I may not solve, but learn. What good is a fish without the skill to catch it?
    Saturday, December 19, 2009 8:26 PM

Answers

  • Create a separate DLL project that contains your forms.
    Allow your other projects to reference this DLL so that they can access and use the standard forms you have defined.

    Food for thought.
    Create a "Master Form" that contains a default "look and feel", as well as some general functionality.
    Add that master template/form to your DLL project, and allow other projects to INHERIT that master template.
    Mark the best replies as answers. "Fooling computers since 1971."
    • Marked as answer by Assimilater Thursday, December 24, 2009 4:03 AM
    Saturday, December 19, 2009 9:09 PM

All replies

  • Create a separate DLL project that contains your forms.
    Allow your other projects to reference this DLL so that they can access and use the standard forms you have defined.

    Food for thought.
    Create a "Master Form" that contains a default "look and feel", as well as some general functionality.
    Add that master template/form to your DLL project, and allow other projects to INHERIT that master template.
    Mark the best replies as answers. "Fooling computers since 1971."
    • Marked as answer by Assimilater Thursday, December 24, 2009 4:03 AM
    Saturday, December 19, 2009 9:09 PM
  • I assume by "DLL Project" you mean "Class Library"? I'll snoop around and see what I can learn :P (Hey nice to hear from you again :P)
    I seek not answers, but understanding, that I may not solve, but learn. What good is a fish without the skill to catch it?
    Saturday, December 19, 2009 9:51 PM
  • Saturday, December 19, 2009 10:00 PM
  • hey, here's a question. What if I want a form to look the same but behave differently? I have a form FrmBusiness that shows a set of data (and i'm thinking of creating a similar form with inherits generic.frmbusiness), but if that form is being used by a different project, then the set of data is going to be arranged slightly differently, so I need seperate code for each case when a certain button is pressed. Would it be easier to simply have two forms or is there a way to call the value of "txtname.text"? 
    I seek not answers, but understanding, that I may not solve, but learn. What good is a fish without the skill to catch it?
    Sunday, December 20, 2009 2:41 AM