Click here to Skip to main content
15,897,291 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I've hidden a windows form and open another form.

When I called back the first form two such forms are opened.

Is there any way to resolve this problem.
Posted
Comments
Krunal Rohit 5-Mar-14 10:23am    
Not clear.

-KR
ZurdoDev 5-Mar-14 10:25am    
What do you need?

1 solution

Yes. Don't create a new form...
Instead do this in Form1:
C#
Form2 f2 = new Form2();
Hide();
f2.ShowDialog();
Show();
Then when Form2 closes, Form1 will be shown again.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900