K
Ken Breit
I have an ActiveX control that I would like to make available from any form
in my application. I figured the best way was to create a reference to it,
and then have a module that will create the instince and assign all of the
properties to the control. This is a control that I did not write, it was
purchased from a vendor. Here is what I have done.
In the references section of my project I have added the ocx.
I then go to a code module, and declare a variable and assign it to the
control reference, along with the class that it has available (through
intellisence)
However, when I try to instantiate the control the class is not available in
intellisense, only an interface and another class that isn't relevant to
what I am doing.
If I use this control on a form, it works fine. However, I wan't the form
to be allowed to be closed.
The control uses the comm port, so I don't want to have to manage opening
and closing the control on each form.
The only other solution I can think of is to have a hidden form that has the
control on it.
I have found some documentation on msdn that talks about using Tlbimp, but
it states that I have to be the author of the control to make it work.
Am I barking up the wrong tree here, and going in the wrong direction, or is
what I am trying to do possible.
TIA
Ken Breit
in my application. I figured the best way was to create a reference to it,
and then have a module that will create the instince and assign all of the
properties to the control. This is a control that I did not write, it was
purchased from a vendor. Here is what I have done.
In the references section of my project I have added the ocx.
I then go to a code module, and declare a variable and assign it to the
control reference, along with the class that it has available (through
intellisence)
However, when I try to instantiate the control the class is not available in
intellisense, only an interface and another class that isn't relevant to
what I am doing.
If I use this control on a form, it works fine. However, I wan't the form
to be allowed to be closed.
The control uses the comm port, so I don't want to have to manage opening
and closing the control on each form.
The only other solution I can think of is to have a hidden form that has the
control on it.
I have found some documentation on msdn that talks about using Tlbimp, but
it states that I have to be the author of the control to make it work.
Am I barking up the wrong tree here, and going in the wrong direction, or is
what I am trying to do possible.
TIA
Ken Breit