Solved

Waiting...

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
JSON on ISAPI REST Server using Delphi 2 229
code issue 8 99
Correct Component for Shopping Cart. 2 95
Delphi inherited method 6 61
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now