Why not just set a variable called FormOpenedAsModalForm, defined as a
boolean in the form before you try to show (or showmodal it). Then check
that variable when you require to.
e.g.
Calling Form
------------
with CalledForm do
begin
FormOpenedAsModalForm := True;
ShowModal
end;
or
with CalledForm do
begin
FormOpenedAsModalForm := False;
ShowModal
end;
Called Form
-----------
if FormOpenedAsModalForm then
DoThing1
else
DoThing2;
Sandy
> -----Original Message-----
> From: delphi-admin@elists.org
> [mailto:delphi-admin@elists.org]On Behalf
> Of Clemens P. Masesa
> Sent: 14 November 2000 14:53
> To: delphi@elists.org
> Subject: Re: Modal Forms
>
>
>
> Yes, but what i want to do is within the form itself. ie
> when a button in
> this form is pressed, i want to check if the form is being
> displayed as a
> modal form so that i do thing1, if not i do thing2, something like
>
> if "FormOpenedAsModalForm" then
> DoThing1
> else
> DoThing2;