Reputation: 13636
I have two WinForm projects(A,B) in one solution.
A project is VB.Net2
B project is C#.Net4
They both have Form.
The A project is set as startup project and has START button. When I press the button I have to activate Form from the B project.
Any Idea how can Implement it?
Thank you in advance!
Upvotes: 4
Views: 17977
Reputation: 399
You first need to get a reference from project A to project B. To do so, right-click project A, select Add Reference
, select tab Projects
, and double-click project B.
Now you'll be able to reference the form in project B in project A:
Namespace.FormName.Show()
Upvotes: 7
Reputation: 9296
Dim sample As New SampleForm()
, in your button click event handlersample.Show()
or sample.ShowDialog()
. The first option will open a modeless dialog box, while the other one is a modal dialog box.Upvotes: 6