Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

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#.
 
Share this answer
 
Comments
akamper 7-Mar-12 10:00am    
Thank you. I already knew the c++ - code snipped. I thought there is a way to do the same or easier in c#.

I'm trying both, parsing the registry and convert the code ;)

Thanks again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900