Hi,
I created a form in a project & wish to use it in another project. I Right
click the project in the project explorer, & choose Add, then I choose
Existing item & navigate to the FormMyForm.cs file. I do not link the file;
it is a new item.
I add it to the project & can see it in the project explorer, however,
intellisense doesn't recognise it as being part of the project. I cannot
instanitate it because it doesn't 'exist' in the project. I save & rebuild
but nothing changes. This works with class files. Why not forms?

Is there something I've missed?

Thanks in advance for any ideas.
Ant

Re: Loading a form from another project by pop

pop
Sun Mar 12 22:56:08 CST 2006


"Ant" <Ant@discussions.microsoft.com> wrote in message
news:6F0A82EA-5B60-448A-AEDE-6CEB464AA27D@microsoft.com...
> Hi,
> I created a form in a project & wish to use it in another project. I Right
> click the project in the project explorer, & choose Add, then I choose
> Existing item & navigate to the FormMyForm.cs file. I do not link the
> file;
> it is a new item.
> I add it to the project & can see it in the project explorer, however,
> intellisense doesn't recognise it as being part of the project. I cannot
> instanitate it because it doesn't 'exist' in the project. I save & rebuild
> but nothing changes. This works with class files. Why not forms?
>
> Is there something I've missed?
>
> Thanks in advance for any ideas.
> Ant
>
>

You've probably missed the namespace.
Solution :
a. try using fully qualified name for the form class ie including the
namespace.
b. change the namespace of this form to the namespace of your project.

Vivek



Re: Loading a form from another project by Ant

Ant
Mon Mar 13 01:14:27 CST 2006

HI Pop,
That was it. I changed the namespace & there you go.

Thanks very much for your assistance.
Regards
Ant

"pop.nagarro.com" wrote:

>
> "Ant" <Ant@discussions.microsoft.com> wrote in message
> news:6F0A82EA-5B60-448A-AEDE-6CEB464AA27D@microsoft.com...
> > Hi,
> > I created a form in a project & wish to use it in another project. I Right
> > click the project in the project explorer, & choose Add, then I choose
> > Existing item & navigate to the FormMyForm.cs file. I do not link the
> > file;
> > it is a new item.
> > I add it to the project & can see it in the project explorer, however,
> > intellisense doesn't recognise it as being part of the project. I cannot
> > instanitate it because it doesn't 'exist' in the project. I save & rebuild
> > but nothing changes. This works with class files. Why not forms?
> >
> > Is there something I've missed?
> >
> > Thanks in advance for any ideas.
> > Ant
> >
> >
>
> You've probably missed the namespace.
> Solution :
> a. try using fully qualified name for the form class ie including the
> namespace.
> b. change the namespace of this form to the namespace of your project.
>
> Vivek
>
>
>