Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use the form that I add an my project

I added a form from another solution.(With right on my solution and clicked add existing item and then select a resent form with name "newForm.cs").Then this form with own objects added to my project.But I can't use this form in my code.For example I want to show this form.But it isn't in my solution as a class that I use:"newForm frm = new newForm". How do I can add this form that I can use it as a class. I hope I have made the correct question. Thanks very much.

like image 922
Tavousi Avatar asked Dec 10 '25 03:12

Tavousi


1 Answers

If you want to set this as startup form then Edit that from the program.cs file

Moreover might be you need to change the namespace of the added form, please check that.

If you want to start this form from other form then create an object of this form and show the instace of this form.

Formname frm1 = new Formname();
frm1.show();
like image 194
Bhavik Goyal Avatar answered Dec 12 '25 17:12

Bhavik Goyal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!