Inheriting from an Inherited Form - Possible?

  • Thread starter Thread starter Adam Tompkins
  • Start date Start date
A

Adam Tompkins

Form A inherits from a base form.

Form B inherits from Form A.

When I try to open Form B in the IDE I get an error:

' The path is not of a legal form '

If I change Form B to also inherit from the base form it opens fine.

Any help would be appreicated.

- Adam
 
Adam,
You might want to make sure that all of your forms are
closed. Compile the application, then try and open Form
B. If that doesn't work, see if you are loading anything
strange inside of the Forms Load event. I think that some
of this data is loaded even in design time. I've run into
situations where I have code in the Load event and I'm
trying to access objects that are not instantiated
because you are in design mode, and the form craps out
when you try to view it in design mode. You shoul also be
able to see where the problem is comming from by trying
to open Form A in design mode. If that works then you
know that the problem lies somewhere in Form B.
 
Hi Dan

Thanks for the response.

There's no code (other than what forms designer has added) in any of the
forms, I'm still at the design stage.

The error is definitely related to what's being inherited. If I inherit
from the base form, Form B will open without problem, as soon as I try to
inherit from Form A, I get the error. Form A also opens just fine.

So it appears that the issue is related to inheriting from an already
inherited form. Have you managed to do that and got it working?

TIA.

- Adam
 
Back
Top