Design time error opening inherited form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a base form from which many forms inherit. The base form is in one
project, and the inherits form is in another project. Both projects are
under the same solution space.

Both forms compile and execute as they should and have done for quite some
time. I can open the base form in design time and visually modify the form.
However, when I try and open the inherited form in design time I get the
error "Object reference not set to an instance of an object" at line 0. In
the solution explorer, the icon next to the inherited form is sometimes a
window and sometimes a VB code icon.

I have checked the constructor code and nothing there seems conspicuous.
Could this be a bug? My searches haven't revealled much information.
 
Peter said:
I have a base form from which many forms inherit. The base form is in one
project, and the inherits form is in another project. Both projects are
under the same solution space.

Both forms compile and execute as they should and have done for quite some
time. I can open the base form in design time and visually modify the form.
However, when I try and open the inherited form in design time I get the
error "Object reference not set to an instance of an object" at line 0. In
the solution explorer, the icon next to the inherited form is sometimes a
window and sometimes a VB code icon.

I have checked the constructor code and nothing there seems conspicuous.
Could this be a bug? My searches haven't revealled much information.


Do you override the OnPaint method? This can cause problems as well for
the designer.

Chris
 
Peter,

Probably you have changed something in the class name, the resx, or a change
in the base form or any other place. I have had this in past often and it
was always reasonable, just one of the stupid thing I did than.

However the first thing you can do is delete all the builded dll's from your
solution.

I hope this helps something,

Cor
 
Back
Top