Hi,
the solution I use in such a situations is the following:
1. define a private member of the form:
FActivated: boolean;
2. in OnActivate handler:
if not FActivated then begin
// it is important the flag to be set before the action
FActivated := true;
// PUT YOUR CODE HERE
Act_New.Execute;
end;
Best,
Stefan
--- In [email protected], "Dino Lolli" <[EMAIL PROTECTED]> wrote:
>
> Hi Guys
>
>
>
> I have the following statement
>
>
>
> var
>
> frm_Client : Tfrm_Client;
>
> begin
>
> frm_Client := Tfrm_Client.Create(Self);
>
> try
>
> frm_Client.ShowModal;
>
> frm_Client.Act_New.Execute;
>
> finally
>
> frm_Client.Release;
>
> end;
>
> end;
>
>
>
> The act_new.execute cannor run as it only executes after the form is
closed.
> What would be the correct way to achieve the act_new.execute in this
code?
>
>
>
> Many thanks
>
>
>
> Regards
>
> Dino Lolli
>
>
>
>
>
> [Non-text portions of this message have been removed]
>