Solved

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

Posted on 2003-11-07
2
158 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
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

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

867 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

21 Experts available now in Live!

Get 1:1 Help Now