Solved

OnActivate Event after Showmodal Close

Posted on 1998-04-28
2
808 Views
Last Modified: 2008-02-01
To prevent the use of a form before closing an other form used the showmodal method. But now after closing the form the OnActivate event of the new Activeform will not appear.
Do i have to do something with the modalresult. Or is there another way to do this
0
Comment
Question by:rene041697
2 Comments
 

Accepted Solution

by:
leeberry2 earned 100 total points
ID: 1338065
You're quite correct. The OnActivate event is not triggered when your other form is closed. But, the OnShow event is. you could put your code here, but beware that this code will be executed every time the form is shown.

Alternatively your code in your main form that creates and shows the second might say something like:

Form2 := TForm2.Create(nil);
Try
  If Form2.ShowModal = mrOk then
  begin
    {perform the code you previously had in the OnActivate}
  end;
Finally
  Form2.Free;


Good Luck

Lee.

0
 

Author Comment

by:rene041697
ID: 1338066
Sure i can use the OnShow event, but only then when the first form is closed or hidden. Since i don't hide or close the first form the Onshow event will not appear. I still have to try the second option you mentioned.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

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…
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

774 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