如何列出所有可用的ActiveX控件? [英] How to list all available ActiveX Controls?
问题描述
你好
我有一个带有PropertyGrid和用户控件的窗体.
我想通过在PropertyGrid中选择它们来添加ActiveX-Controls(所以我想在UITypeEditor的列表中列出acitveX控件).
这可能吗?
如何访问可用的activeX控件列表,以便获取其clsid.
是否可以使用winforms-designer中使用的"COM组件"打开工具箱?这个吗?
http://www.codeproject.com/KB/cs/ImportActiveX/image001.png [ ^ ]
谢谢您的帮助.
Hello
I have a Form with a PropertyGrid and a UserControl on it.
I would like to add ActiveX-Controls by choosing them in the PropertyGrid (so I would like to list the acitveX controls in list in an UITypeEditor) .
Is this possible?
How can I access the list of available activeX Controls, so that I can get their clsid.
Is it possible to open the Toolbox with the "COM Components" that is used in winforms-designer? This one?
http://www.codeproject.com/KB/cs/ImportActiveX/image001.png[^]
Thanks for you help
推荐答案
是否可以使用winforms-designer中使用的"COM组件"打开工具箱?这个吗?
仅当您在应用程序中安装Visual Studio时.可能不是一个好主意.
可以办到.有两种不同的方法可以做到,但是每种方法都会给您带来不同的结果.
一种方法是解析注册表中的整个HKEY_CLASSES_ROOT项,以查找形式为"sometext.someothertext"的值.然后,您可以从该键获取.DLL/.OCX路径值.
另一种是转换此代码 [
Is it possible to open the Toolbox with the "COM Components" that is used in winforms-designer? This one?
Only if you install Visual Studio with your application. Probably not a good idea.
It can be done. There''s a couple of different methods of doing it, each wil give you different results though.
One method is to parse through the entire HKEY_CLASSES_ROOT key in the registry, looking for values of the form "sometext.someothertext". Then you can get the .DLL/.OCX path value from that key.
THe other is to convert this code[^] to C#.
这篇关于如何列出所有可用的ActiveX控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!