Inheriting from an Inherited Form - Possible?

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
 
D

Dan

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.
 
A

Adam Tompkins

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
 

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