RE: inherited forms - random debugging errors



I have this problem as well. Is there any solution to this? It is starting
to drive me nuts.

I make a simple change to the code and all of a sudden, 5 or 6 completly
different forms have "lost" variables or methods. Most of these forms
inherit from a base form. Changing the form class on each page from Public
to Private, and back to public ( exactly back to the way it was ) fixes the
problem.

Things I have noticed:
Seems to happen more when I have a designer open, or when a dataset is open.
But, has happend when I have only had code open.
I close all designers before building.
A restart of VS, or the machine usually helps for a while, but it will
always show up.
Did not get really bad until other modules were added and project got large.
Once it does start, and I dont restart, I can almost count on VS quitting
with no warning. Just disappears.



"AMercer" wrote:

> I have the same problem with a fairly large vb app with about 30 classes.
> Classes are independant of each other except one case of a base class and
> four derived classes. I F5 (start) only after trivial edits. I rebuild
> after extensive edits or any change that affects classes in a major way, eg
> changing a method from private to public. I think MS wants an example before
> acknowledging a problem, but examples of this problem require a sufficient
> degree of project complexity. In my opinion, there is a bug in build with
> projects of sufficient complexity.
>
> "Eickhel" wrote:
>
> > Hey,
> >
> > I have an application that has many inherited forms from a base form.
> > Everything works well but every now and then when I hit "Start" VS .Net 2003
> > gives me errors from the inherited forms.... I need to Rebuild the Solution
> > and then everything is ok... does anyone knows why does this happen?
> >
> > Thanks!
.



Relevant Pages

  • 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: 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)
  • Creating similar versions of apps with inheritance
    ... The main difference will be the 3rd party control that will be the ... 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)