Solved

How can i call a specific form and continue executing instruccions after the form is closed

Posted on 2003-11-07
2
157 Views
Last Modified: 2012-05-04
Hi, I need to know how can i activate a Form from a specific function and after then form is closed return to the function that activate it. And execute the rest of the functions.
Example.

  I have a form to make a search from an specific table. That search is going to return some values i need to work for on the "parent" form so, when i close then "child" form i need the program to coninue executing other instruccions After the

     "Form1.Visible := True;"

   
0
Comment
Question by:jpmonja
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 250 total points
Comment Utility
just use

     Form1.ShowModal;

instead of

     Form1.Visible := True;

meikl ;-)

   



   

0
 
LVL 1

Expert Comment

by:Chopinke
Comment Utility
Here is another way if you want to create this window at runtime and not automatically when the app starts:

Go to Project / Options and remove the FormX from the autocreate.

Then when you want to show the form ( I assume this is a dialog box for example), then:

FormX := TFormX.Create(FormMain);
try
  if FormX.ShowModal = mrOK then
    //OK button was pressed on the form
  else
    //Some other button, like CANCEL button was pressed
finally
  FormX.Free;
end;
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

9 Experts available now in Live!

Get 1:1 Help Now