in your project source file, after application.initialize put
if Comserver.StartMode = smAutomation then
    Application.Showmainform := false;

You will need to add ComServ to the uses list in the project source

-----Original Message-----
From: Peter Harrison IT <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Date: Wednesday, March 03, 1999 2:10 PM
Subject: [DUG]: OLE and hiding the main form


>I have an application which has a form I would like to bring up using
>OLE Automation.  I have got to the point where I have a OLE automation
>object which does what I want - ie viewing the right form, but the main
>form is popping up when I do the create.
>
>What I want is a way not show the main form when the EXE is being
>accessed by OLE, but to show the main form normally when starting the
>EXE normally.
>
>I have found a property of a TAutoObject called RefCount, but I can't
>see in my app where it is being created.  I was hoping to set
>Application.ShowMainForm to false if TAutoObject.RefCount was greater
>than Zero.
>
>Can anyone help pleeze.
>
>Peter Harrison
>Software Developer
>Sovereign
>
>---------------------------------------------------------------------------
>    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                  Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to