Calling a Form in another project

stewarts

Member
Joined
Apr 8, 2003
Messages
22
I have a VB .NET Windows application (solution) that contains 2 projects. How can I display a form that is in Project2 from a form that is in Project1? I thought I could reference the project name (which would also be its namespace name) but it keeps telling me the name is undefined. Running form1 in Project1...trying to show ReportForm that is in Project2. I tried:

Dim newform as New ReportForm()

Also tried:
Dim newform as New Project2.ReportForm()

I guess Im missing a step somewhere???

Thanks!
 
You have to remember that a form is just a class, and like any other class, you cant use it in another class unless its referenced or in the same folder.

So basically what Im saying is, you need to reference the form.
 
Back
Top