PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Re: Bring in a form from another solution/project
Forums
Newsgroups
Microsoft DotNet
Microsoft VB .NET
Re: Bring in a form from another solution/project
![]() |
Re: Bring in a form from another solution/project |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Having two forms with the same name in the same project won't work.
Here is an approach for adding an existing Form to a project. 1. Rename the form in the source project. (Only when it has the same name as a form in your main project.) 2. Then, from the destination project right click the name of the project in the Solution Explorer panel and select Add -> Existing Item... 3. An 'Add Existing Item' dialog will open. Use it to navigate to the source project directory. 4. Find the files for the Form you wish to pull into the destination project. There will be three, each with the same name but with different file extensions (.vb, .resx, .designer.vb). 5. Select all three then click the Add button. The form is added to your main project. As far as showing the form you imported as a modeless dialog from your main form: When you call the form use [Form].ShowDialog instead of [From].Show. -- Mike Mike McIntyre [MVP] http://www.getdotnetcode.com "BobAchgill" <BobAchgill@discussions.microsoft.com> wrote in message news 7D7586C-16C9-4093-94F8-DC904E9808F9@microsoft.com...>I want to include a form and it's code that resides in another > solution/project into my current solution such that I can Display said > form > as a modeless dialog of my main form. > > How is best to get that form and code into my main solution? > > After you tell me how to do that... > > Will it be a problem that both forms are called form1? > > Thanks! > > Bob |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 
7D7586C-16C9-4093-94F8-DC904E9808F9@microsoft.com...
