Inherited Form Designer gives Exception

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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.
 
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.
 
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.
 
Back
Top