The reason you are getting the AV is that Form1 doesn't exist. You are
creating an instance of TForm1 not the variable form1. Two different things.

Anyway, in the project source try

Application.ShowMainForm := False;

----- Original Message -----
From: Alistair George <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 1:34 PM
Subject: [DUG]: Showmodal problems


> Hi all:
>   with TForm1.Create(nil) do
>   try
>     ShowModal;
>   finally
>     free;
>   end;
>
> if, in TForm1.Onshow I set form1.visible:=false; or form1.hide then this
raises
> an access error.
> I dont want to show the form when it is created, but have it running in
the tray
> Icon.
>
> Any thoughts?
>
> Cheers,
> Al+
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to