Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pause one form until another for is closed

Status
Not open for further replies.

Malcav

Programmer
Oct 7, 2005
43
GB
Hi
I am using c#.net and have a program with multiple forms. In one instance I would like the code in the form that creates a new form to pause until the form it has called is closed. sounds confusing i.e.
1. click the "enter details" button on the main form.
2. "enter detail" form opens.
3. main form stops running code
4. "enter detail" form closes.
5. main form starts running its code again.

is this possible, feasable, practical, etc.
 
aye - no probs.

Code:
EnterDetailsForm frm = new EnterDetailsForm()
frm.ShowDialog();
//  Only get here when form is finished
int myFirstDetail = frm.Property1
frm.Dispose()

Hope this helps,

Graeme

"Just beacuse you're paranoid, don't mean they're not after you
 
Perfect. Exactly what I wanted.
Thank you very much.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top