Form Inheritance
-
I have a project with a main form that accesses inherited forms with their appropriate .dll's. I have several that work fine. However, the latest form gives me the following error when I try to compile the main form: " "_Form() is inaccessible due to its protection level I understand what it is saying. I just dont see why. I am able to compile and run the inherited form separately with no problem. However, once I call it from my main form, I receive the previous error. Any help would be much appreciated. Thanks. D
-
I have a project with a main form that accesses inherited forms with their appropriate .dll's. I have several that work fine. However, the latest form gives me the following error when I try to compile the main form: " "_Form() is inaccessible due to its protection level I understand what it is saying. I just dont see why. I am able to compile and run the inherited form separately with no problem. However, once I call it from my main form, I receive the previous error. Any help would be much appreciated. Thanks. D
-
Is the _Form declared as protected instead of public as it should be? I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.
-
spif, Thanks for the quick response. However, the form is declared as public. public _Form(){} Any other ideas? I am assuming it isn't a user control because it would give me this error when I run the application stand-alone. What could it be? D
-
spif, Thanks for the quick response. However, the form is declared as public. public _Form(){} Any other ideas? I am assuming it isn't a user control because it would give me this error when I run the application stand-alone. What could it be? D
Try to write the whole namespace in front of the initialization. ex. System.Windows.Forms.Form f = new System.Windows.Forms.Form(); ^^replace with the _Form's namespace. There may be another Form with same name which is inaccesable (private or protected) I'm in the high-fidelity first class traveling set. And I think I need a Lear jet.