G
Gilad
Hi,
I'm trying to use ActiveX control with more than one interface into my
window form.
any way i'm trying to do it (through the IDE or through AxImp.exe) the
only interface exposed is the default interface.
till now the only way i found for doing this is to use the AxImp.exe
and generate a .cs file and then to edit it:
1. declare another interface reference
private MyAx.IMyCompoenent ocx; //generated
private MyAx.IMyCompoenent2 ocx2; //added manually
2. modify AttachInterfaces method
this.ocx = ((MyAx.IMyCompoenent)(this.GetOcx())); //generated
this.ocx2= ((MyAx.IMyCompoenent2)(this.GetOcx())); //added
manually
3. implement each and every method delegation of IMyCompoenent2
i'm sure there is a much easier way for doing it, but i wasn't able to
find it.
thanks in advance
I'm trying to use ActiveX control with more than one interface into my
window form.
any way i'm trying to do it (through the IDE or through AxImp.exe) the
only interface exposed is the default interface.
till now the only way i found for doing this is to use the AxImp.exe
and generate a .cs file and then to edit it:
1. declare another interface reference
private MyAx.IMyCompoenent ocx; //generated
private MyAx.IMyCompoenent2 ocx2; //added manually
2. modify AttachInterfaces method
this.ocx = ((MyAx.IMyCompoenent)(this.GetOcx())); //generated
this.ocx2= ((MyAx.IMyCompoenent2)(this.GetOcx())); //added
manually
3. implement each and every method delegation of IMyCompoenent2
i'm sure there is a much easier way for doing it, but i wasn't able to
find it.
thanks in advance