I have two forms i.e. Form A and Form B. If Button X of Form A is clicked only then Form B will show and Form A will hide. I have to do all this in program.cs of a windows Form Application.
Here is the code snipped
FormA A = new FormA ();
FormB B = new FormB ();
A.Show();
if(Button in form A is clicked then )
B.Show() and A.hide();
else
application.close()