Development,
Just because the file exists on the system doesn't mean that you can
actually use it. If it is not registered properly, then you will not be
able to use it at all.
Also, the framework (from what I can tell), doesn't provide a mechanism
to just create a Windows Forms control which hosts an ActiveX control, the
AxHost program seems to do that without exposing components to do so. In
order to host your control dynamically, you will have to run the AxImp
utility on the command line, and then dynamically load the assembly into
your app. If you want to call anything specific on the control, you will
have to use reflection, or cast it to an interface which you know the
control implements.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Development" <de*********@scansys.nl> wrote in message
news:eh**************@TK2MSFTNGP11.phx.gbl...
I want to add an ActiveX only if it exists on the system. (For licensing
reasons).
So I want to check at runtime if a certain ocx file exists and if it does
I want to use it. Is it possible?