Board index » delphi » Application without main window with Delphi 2 (W95)

Application without main window with Delphi 2 (W95)

I tried unsucessfully to create an application not including a main
window (it is an OLE server which have no user interface. I Only want an
icon to appear in the notification area of the taskbar). Unfortunately,
my application closes immediately after lauch. I'm also not able to hide
the main window afterwards.

My question is simply : How can I do it ?????

Please answer by mail at the E-mail address below (Do not reply, I
didn't posted this message from my usual address).

Thank you !

_________________________________________________________

A.S.Porret  
NGS S.A.
Puits-Godet 10
2000 Neuchatel
Switzerland
Tel: +41 38 21 10 37
Fax: +41 38 21 10 43
E-Mail: n...@access.ch
______________________________ Eudora F2.1 _________________

 

Re:Application without main window with Delphi 2 (W95)


Quote
Thierry Melly wrote:

> I tried unsucessfully to create an application not including a main
> window (it is an OLE server which have no user interface. I Only want an
> icon to appear in the notification area of the taskbar).

        If you want an icon you need a window. You could maybe have a
hidden window, and who knows, there could be _some_ way to get a
windowless application to appear on the taskbar, but I doubt it.
Presumably you want to do something when the user clicks on the icon;
this means something is supposed to respond to some message, and
windows are what messages get sent to.

        Usually when people talk about windowless applications what
they have in mind are applications that are supposed to do just one
thing and then exit. The only reason the typical Windows application
does not exit immediately is it's busy with its message loop. (Look
at the source for Application.Run.)

--
David Ullrich
Sig file accidentally deleted - sorry.

Re:Application without main window with Delphi 2 (W95)


In article <31DD5B7F.3...@math.okstate.edu>,
   David Ullrich <ullr...@math.okstate.edu> wrote:

Quote
>Thierry Melly wrote:

>> I tried unsucessfully to create an application not including a main
>> window (it is an OLE server which have no user interface. I Only want an
>> icon to appear in the notification area of the taskbar).

>    If you want an icon you need a window. You could maybe have a
>hidden window, and who knows, there could be _some_ way to get a
>windowless application to appear on the taskbar, but I doubt it.
>Presumably you want to do something when the user clicks on the icon;
>this means something is supposed to respond to some message, and
>windows are what messages get sent to.

>    Usually when people talk about windowless applications what
>they have in mind are applications that are supposed to do just one
>thing and then exit. The only reason the typical Windows application
>does not exit immediately is it's busy with its message loop. (Look
>at the source for Application.Run.)

I think what you need to do is :
        Application.showmainform:=false;

It does exactly what yuu describe.

Re:Application without main window with Delphi 2 (W95)


To create a Delphi application with no forms, do this:

1. Create a new application
2. Remove Unit1 from the project
3. Create a new UNIT (not form)
4. Place your source code in the unit
5. Remove {$R *.DFM} from the implementation clause
6. In the project file uses clause, replace Forms, Unit1 in
'Unit1.pas'; with Unit1; (or whatever your Unit is called)
7. Remove Application.Initialize and Application.Run from
the project file and call your procedure instead

Ed Gadziemski
EFG Systems, Inc.
Ashburn, VA  USA

http://www.efgsystems.com
e...@efgsystems.com

Other Threads