Михаил Подгурский wrote:
>  Is there any way to add any ActiveX controls to WinForm in IronPython
>  code?
Hi,

The procedure should be similar to that used in C#. There are details 
about that here: http://www.codeproject.com/csharp/importactivex.asp.

Basically, all you need to do is generate a managed wrapper for the 
ActiveX component using one of the tools in the .NET SDK:

AxImp /source activex_control_path_name

Once you have this wrapper, you import it into IronPython in the usual 
way (clr.AddReference), and can create instances of the control (you can 
browse the assembly that has been generated to find the control class 
using dir() in IronPython or the SDK tool ildasm) and add it to your 
windows form with ease. Please note, however, that this is all theory: I 
haven't actually tried doing this, but I can't see any obstacles to this 
working. That said, there may very will be some issues here, so I'd be 
interested to hear how you get on!

Hope this helps,

Max
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to