Solved

Waiting...

Posted on 2004-08-19
3
186 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 40 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 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