Home All Groups Group Topic Archive Search About

How to call a form in another project

Author
7 Mar 2006 3:36 PM
Robert Gage
Hello All
Can anyone tell me in a single solution how to call a form in another
project?
I have a large solution made up of several projects and need to call back
and forth betweem them

TIA

Author
7 Mar 2006 3:44 PM
Herfried K. Wagner [MVP]
"Robert Gage" <rg***@estarnow.com> schrieb:
> Can anyone tell me in a single solution how to call a form in another
> project?
> I have a large solution made up of several projects and need to call back
> and forth betweem them

Add a reference to the other project to your project, then import the
namespace containing the form class you want to instantiate and create an
instance as you do it with forms defined in the project:

\\\
Imports ClassLibrary1
....
Dim f As New Form1()
f.Show()
///

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
7 Mar 2006 4:03 PM
Robert Gage
Thank You

Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:OxVl43fQGHA.2816@TK2MSFTNGP15.phx.gbl...
> "Robert Gage" <rg***@estarnow.com> schrieb:
> > Can anyone tell me in a single solution how to call a form in another
> > project?
> > I have a large solution made up of several projects and need to call
back
> > and forth betweem them
>
> Add a reference to the other project to your project, then import the
> namespace containing the form class you want to instantiate and create an
> instance as you do it with forms defined in the project:
>
> \\\
> Imports ClassLibrary1
> ...
> Dim f As New Form1()
> f.Show()
> ///
>
> --
>  M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
>  V B   <URL:http://classicvb.org/petition/>
>