Board index » delphi » W95: Building Background Application

W95: Building Background Application

Windows 95, Delphi 3.0 or (1.0)

Can someone give me a pointer on building a background application?
What I need is an app which when loaded will stay "dormant" in the
background, as invisible as possible, but able to write to a file on
Windows Exit.

I know I can use WM_QUERYENDSESSION to run code on Windows Exit but I
am having trouble making the app 'dormant'.  Ideally the app would not
show up on the start menu.

Thanks,

____
Mike E. Fullerton   | UNIX, Quotations, Science, Skepticism
cmat...@spots.ab.ca | http://www.spots.ab.ca/~cmatrix/

 

Re:W95: Building Background Application


Quote
Mike E. Fullerton wrote:
> I know I can use WM_QUERYENDSESSION to run code on Windows Exit but
> I
> am having trouble making the app 'dormant'.  Ideally the app would
> not
> show up on the start menu.

I have done some work building OLE Automation Servers in Delphi 2.0 and
had this same problem.  The trick is in using an TApplication property
"ShowMainForm".

In project file:

Application.ShowMainForm := False;

Of course this only works if you are planning on using a form. If not
...?

MAT

Re:W95: Building Background Application


"Matthew A. Townsend" <matow...@cacd.rockwell.com> wrote:

Quote
>Mike E. Fullerton wrote:
>> I know I can use WM_QUERYENDSESSION to run code on Windows Exit but
>> I
>> am having trouble making the app 'dormant'.  Ideally the app would
>> not
>> show up on the start menu.
>I have done some work building OLE Automation Servers in Delphi 2.0 and
>had this same problem.  The trick is in using an TApplication property
>"ShowMainForm".
>In project file:
>Application.ShowMainForm := False;
>Of course this only works if you are planning on using a form. If not
>...?

Well, in case anyone is interested I am not using a form so I ended up
using this which seems to work:

        ShowWindow( Application.handle, SW_HIDE + SW_MINIMIZE );
        while True do
                 Application.ProcessMessages;

____
Mike E. Fullerton   | UNIX, Quotations, Science, Skepticism
cmat...@spots.ab.ca | http://www.spots.ab.ca/~cmatrix/

Other Threads