Inherited Form Designer gives Exception

G

Guest

Hi,
I have Project1 in which I have frmBase. I compiled the code and then
added an inherited form(frmChild) to the project which inherits from
frmBase. When I open the designer for frmChild the designer throws an
exception, "Object reference not set to an instance of an object."

Please help, what should I do to use inheritance within a project.

Thanx,
Debi
 
G

Guest

Just go through your core and make sure that the base form doesn't create
anything during design time that would throw an exception. For example, you
might have a data class trying to connect to a database but you depend on
some login object that was never instantiated. During runtime the base form
works but during designtime it fails.
 
G

Guest

frmBase is a blank form. The exception message is "An exception occured while
trying to create an instance of frmBase." Both forms are in the same project.
 
G

Guest

Actually I have code in Baseform Resize event which is causing the exception.

Resize calls a function after checking the window size and a variable. No
idea why this is causing exception. There is no data access.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top