Hi all...
I'm beginner in c#, Now I'm doing project contain 3 forms... And if I want to show form 2 and hide form 1 as example ... write this code

Form2 f2=new Form2();
f2.show();
this.hide();  //hide form1
this.close(); //when I need close the form

This is most popular code for multiple form.

Problem: when I want to exit pro...
the forms (1 and 2 and 3) is hidden,
But process for the pro not exit!!!! Why????

Thank's

Recommended Answers

Use Application.Exit() to terminate an application.

Jump to Post

All 3 Replies

Use Application.Exit() to terminate an application.

You are great man,

I don't know how I thank you....
(10^6)*Thank's adatapost

application.exit();

commented: Post is 3 years old, and the same answer has already been suggested. -1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.