on-internet
← Community

How to showmodal a form but not show it?

Stack Overflow ·

I have this situation : from Form1, i want to call Form2, wait Form2 do its thing and go back to Form1. But i don't want to show Form2. I'm doing something like this in Form1 : procedure TForm1.button1Click(Sender: TObject); begin application.createform(tform2, form2); form2.visible := false; // has no effect form2.showmodal; showmessage('form2 done !'); end; It's working except due the fact i don't want to show Form2, but i need to wait Form2 complete its work. If i call 'show' instead of 'showmodal', the procedure won't stop and show 'form2 done' right away.

Comments

Sign in or sign up to comment and upvote.

No comments yet.