NEURO
NEURO

Reputation: 7

Windows Forms Open a form that it is inside a folder

I know if i want to open or jump to another form i need to use the code:

this.Hide();
Form f = new Form();
f.Show();

But what if the form that i want to open it is on a folder?, something like this

Im on the Login form and i want to open the Main form that it is inside the "Admin" folder. Thanks.

Upvotes: 0

Views: 1552

Answers (1)

Znaneswar
Znaneswar

Reputation: 3387

Each folder in the project will be treated as a namespace so add foldername as namespace and access it

using Admin;

Form1 f1 = new Form1();
f1.Show();

or simple way

Form f = new folder.testing();
f.Show();

Upvotes: 2

Related Questions