MissingManifestResourceException

H

H?seyin

I have a project (called Project1) which contains a main form (called
mainform1) and several other forms. I would like to use mainform1 of
Project1 in another project (called Project2) as a normal form but not
as a main form. The main form (called mainform2) of Project2 is
different than mainform1. Mainform2 will simply call mainform1 with
ShowDialog.

For this purpose when adding mainform1 to Project2 I deleted the
static main function from mainform1 so it can be compiled. And then I
wrote the code in mainform2 to call mainform1.
When running the application and calling mainform1 from mainform2 I
get System.Resources.MissingManifestResourceException. "Additional
Information: Could not find any resources appropriate for the
specified culture(or the neutral culture)". I think the problem is
related to .resx and .resources files.

Could you please give me any idea about how to add a main form to
another project as a normal form?

Thanks for help.

Huseyin Ozkan.
 
G

Guest

The two projects have no means to check if the form you refer to is actually one and the same form. If you want to use a form in more projects, create a .NET class library and compile the form into this library
Than add the library to the references in both projects (make sure you do not include the form itself!). Now you are able to call the form from both project withou a problem

Hope this helps
Hans
 

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