Click here to Skip to main content
15,567,482 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi
I want to know, I have two windows forms "A" and "B" open now I want to close form B to be closed before returning to form A.

E.g create a form with a button, when clicking the button it must show a message box, now return to the form without closing the message box, see how the message box flashed to be closed first before returning to the form.

How do I do that with two forms?
Posted
Comments
[no name] 15-Jul-12 11:01am    
Show your forms non-modal.

1 solution

Just show the second form with the ShowDialog method instead of Show - the original form will be frozen until the second form is closed.
 
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