Solved

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

Posted on 2003-11-07
2
161 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
[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
2 Comments
 
LVL 27

Accepted Solution

by:
kretzschmar earned 250 total points
ID: 9702716
just use

     Form1.ShowModal;

instead of

     Form1.Visible := True;

meikl ;-)

   



   

0
 
LVL 1

Expert Comment

by:Chopinke
ID: 9705813
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi 2 90
Firemonkey DbLookupComboBox equivalent ? 2 77
Delphi: making a BW image transparent 10 136
Browsing a TTreeView in Delphi 5 47
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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
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 …

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