Board index » delphi » OLE server visible/not visible

OLE server visible/not visible

Hello, all together,

we have a written an OLE server for our application. Everything works fine
so far. Now we want to be able to make our OLE server visible or not
visible. When the OLE server is started, we have to create our main form
but we can not leave it VISIBLE := FALSE. So how can we create our
application/OLE server without bringing it up on the screen?

Thanks very much for a reply.

Bye,
J. Bauer
bau...@bauer-software.de

 

Re:OLE server visible/not visible


Look at TApplication.ShowMainForm. Put this property of the application
instance to false when there's a commandline parameter -Embedding. This
parameter is given to you when you're started as an OLE server.

Cheers,
Anco.

Quote
Junel wrote in message <01bd8293$b8c280c0$70769...@robin.bauer-hp.de>...
>Hello, all together,

>we have a written an OLE server for our application. Everything works fine
>so far. Now we want to be able to make our OLE server visible or not
>visible. When the OLE server is started, we have to create our main form
>but we can not leave it VISIBLE := FALSE. So how can we create our
>application/OLE server without bringing it up on the screen?

>Thanks very much for a reply.

>Bye,
>J. Bauer
>bau...@bauer-software.de

Re:OLE server visible/not visible


 Application.Initialize;
  Application.Title := 'Title';
  Application.CreateForm(TkmMainForm, kmMainForm);
  ShowWindow(Application.Handle, SW_HIDE);
  Application.ShowMainForm := FALSE;
  Application.Run;

Hope that helps.

David

Quote
Junel wrote in message <01bd8293$b8c280c0$70769...@robin.bauer-hp.de>...
>Hello, all together,

>we have a written an OLE server for our application. Everything works fine
>so far. Now we want to be able to make our OLE server visible or not
>visible. When the OLE server is started, we have to create our main form
>but we can not leave it VISIBLE := FALSE. So how can we create our
>application/OLE server without bringing it up on the screen?

>Thanks very much for a reply.

>Bye,
>J. Bauer
>bau...@bauer-software.de

Other Threads