Creating similar versions of apps with inheritance

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: carlor (carlor_at_discussions.microsoft.com)
Date: 10/26/04


Date: Tue, 26 Oct 2004 11:49:06 -0700

Hi there,

Could someone give me the general overview of how I could go about this:

I am creating two applications that are based on virtually all the same
code. The main difference will be the 3rd party control that will be the
majority of the main form. Each version of my app will have a different
control with supporting code. My plan is to create a base main form with
method stubs that at the moment will be "overridable". I may in the future
convert the main form to an abastract form (must inherit).

I would then like to have a separate project for each version where the main
form is then inherited from the base form mentioned above. This way I can
create setup projects for each version. I just tried that but when I went to
add an inherited form, it could not find the base form in any of the
assemblies. Is this possible?

I guess the other way I could do it was to have all the forms in the same
project: base and inherited. Unless there is some way to manage all this I
think it may get messy trying to create multiple executables from the same
project. Wouldn't there be quite a bit of manual changes to project settings
each time I wanted to build the "other" application?

Another way of doing this would be to create separate solutions for each
version of the application (I didn't think of this until just now.) The more
I think of it, the more I like this idea.

I'm sure this has been done before so I'm just looking for the best gameplan.

Thanks,

Carlo.



Relevant Pages

  • Re: Creating similar versions of apps with inheritance
    ... I'd suggest to take a look on books about design patterns. ... I may in the future> convert the main form to an abastract form (must inherit). ... > I would then like to have a separate project for each version where the> main ... > form is then inherited from the base form mentioned above. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • RE: Form Load - Designer Exception
    ... 2.> forms are inherit from base templates... ... In fact, if a form is inherited from a base form, when we open it in the ... InitializeComponent method of the currently opened form is executed. ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework.windowsforms.designtime)
  • Re: Exposing a field in a base control to inherited control via de
    ... I have a panel in a base form that I want to somehow ... that declared it and any classes that inherit that class. ... lets call it contentPanel. ... using the visual designer. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • RE: inherited forms - random debugging errors
    ... inherit from a base form. ... > projects of sufficient complexity. ... >> I have an application that has many inherited forms from a base form. ... I need to Rebuild the Solution ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Creating similar versions of apps with inheritance
    ... > I'd suggest to take a look on books about design patterns. ... >> I would then like to have a separate project for each version where the ... >> form is then inherited from the base form mentioned above. ... >> add an inherited form, it could not find the base form in any of the ...
    (microsoft.public.dotnet.framework.windowsforms)