Question Multiple forms and program flow

stepcicc

New member
Joined
Oct 1, 2008
Messages
2
Programming Experience
1-3
Hi

I have a form with a button. Once the button is clicked another form opens with data retrieved from SQL in a datagridview.
MY problem is that once the first button is clicked I want the program flow to stop there in the first form, then the second form must open and once I close the 2nd form, the program flow must continue where it stopped in first form.
How do I do this? Current the 2nd form opens but the program flow continues in the first form as well.

Regards
Carlo
 
Hello.

You're talking about something like disabling the first form?
Why not just hide it (Visible = False)? Or you could also loop through all controls and set them Enabled = False.

Bobby
 
Show the second form Modally.

VB.NET:
Form.ShowDialog

When the second form closes code execution will return to the point after ShowDialog was called.
 
Back
Top