3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by AndreRet
0

To open a form of another project, you need to reference the project 2 in project 1. For that, you need to rebuild the entire

solution to create the exe file of Project 2 available in the bin folder. Then you need to add the references of the Project 2 exe in the Project 1.

We will also have to import the project 2 namespace in our project 1 using Import keyword.

Imports Project2

Then lets say on a button click, you may use the following code:

Dim frm As New Project2.Form1

    frm.ShowDialog()

I hope this will help.

0

You need to reference your project in project 1. Go to 'Project - Referneces and select vbpProject2 (or whatever your second project is called) and add the reference.

From Project1 add the following where you want to call the project 2 form -

Dim objNewForm as Form

objNewForm = New Project2.Form2

objNewForm.SHow()

Happy coding

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.