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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open other form and pause? 1

Status
Not open for further replies.

KempCGDR

Programmer
Jan 10, 2003
445
GB
Ok, I have one form (frmSplash) that carries out a load of processing to check various datafiles are correct. If it finds an error, it needs to open another form (frmNoMaster) and stop what it's doing until the user has finsihed with the other form. At the moment, I have

frmSplash.Hide;
frmNoMaster.Show;
frmSplash.Enabled := False;

And

frmSplash.Enabled := True;

when needed in frmNoMaster, but it just continues with what it was doing. I tried

frmSplash.Hide;
frmNoMaster.Show;
Repeat
Until Tag = 4;

on frmSplash and set it to that in frmNoMaster, but the second form never got displayed because the loop ate up all the processing ability of the program (though not of my comp obviously).

Any ideas?
 
Instead of .Show, show modal. This suspends processing in the calling splash form:
Code:
  nResponse := frmNoMaster.ShowModal;

Then if nResponse is mrCancel you can gracefully exit the app.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top