Board index » delphi » How can I instantiate a TDCOMConnection component in run time?

How can I instantiate a TDCOMConnection component in run time?

Hi.
Im trying to instantiate a new TDCOMConnection in run time, just like
this:

procedure MyForm.Something;
var Client:TDCOMConnection;
begin
   ...
   Client.Create(Self);
   ...
end;

But it fails whern calls Create over Client instance. The parameter type
of Create is AOwner, so I put the form where Im working, I suposed that
it would work, but it dindt, Can you help me?
Thank you

 

Re:How can I instantiate a TDCOMConnection component in run time?


Jorge,

Try:

Client := TDCOMConnection.Create(Self);

Nick.

Jorge Enrique Jimnez <jorge.jime...@jol.net.co> wrote in message
news:37E70ADE.8B643E79@jol.net.co...

Quote
> Hi.
> Im trying to instantiate a new TDCOMConnection in run time, just like
> this:

> procedure MyForm.Something;
> var Client:TDCOMConnection;
> begin
>    ...
>    Client.Create(Self);
>    ...
> end;

> But it fails whern calls Create over Client instance. The parameter type
> of Create is AOwner, so I put the form where Im working, I suposed that
> it would work, but it dindt, Can you help me?
> Thank you

Other Threads