Board index » delphi » How can a server detect if it is started manually or by automation

How can a server detect if it is started manually or by automation

Hi all !

I'm currently trying to write an automation server.

When it is started manually, it should display a user interface (say:
show its main form), and when it's started by its corresponding client,
it should run without displaying anything (just serve).

How is this possible ( or do I have to write a completely invisible
server and write different clients with different UIs) ?

TIA,

Dets (Detlev Trippler)

 

Re:How can a server detect if it is started manually or by automation


Quote
Dets wrote in message <37BD0EE2.70D30...@caix.net>...
>Hi all !

>I'm currently trying to write an automation server.

>When it is started manually, it should display a user interface (say:
>show its main form), and when it's started by its corresponding client,
>it should run without displaying anything (just serve).

In your project source, put the following:

  Application.ShowMainForm := (Comserver.StartMode = smStandAlone);

you'll also need to put Comserv in your uses clause;

Steve@**delphi.freeuk.com

remove ** to reply

Re:How can a server detect if it is started manually or by automation


Hi Steve,

Steve schrieb:

Quote
> In your project source, put the following:

>   Application.ShowMainForm := (Comserver.StartMode = smStandAlone);

> you'll also need to put Comserv in your uses clause;

Works as expected, thank you very much,

Dets (Detlev Trippler)

Other Threads