Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Waiting...

Posted on 2004-08-19
3
Medium Priority
?
189 Views
Last Modified: 2010-04-05
Hello,

How can I show a form then wait until that form is closed before going on with code.
E.g

Form2.Show;
//Form2 Is Closed By User
ShowMessage('You Closed Form2');

But I dont want this.

procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
ShowMessage('You Closed Form2');
end;
0
Comment
Question by:-Karamja-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
Tyrsis earned 160 total points
ID: 11848721
Just use:

Form2.ShowModal;
0
 
LVL 3

Expert Comment

by:KyleyHarris
ID: 11848729
Agreed. Showmodal.
0
 
LVL 12

Expert Comment

by:esoftbg
ID: 11849265
Tyrsis is right:
procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.ShowModal;
  //Form2 Is Closed By User
  ShowMessage('You Closed Form2');
end;
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question