Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to call a Form from another project

Tags:

c#

.net

vb.net

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!

like image 276
Michael Avatar asked Dec 11 '22 22:12

Michael


1 Answers

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()

like image 59
NetWave Avatar answered Jan 11 '23 15:01

NetWave