By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,360 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,360 IT Pros & Developers. It's quick & easy.

Design time error opening inherited form

P: n/a
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.
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies

P: n/a
Peter wrote:
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
Nov 21 '05 #2

P: n/a
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
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.