[python-win32] ActiveX

Mark Hammond mhammond at skippinet.com.au
Fri Sep 10 07:23:58 CEST 2004


> I know that you can ActiveX controls but am completely new to using
> them. I have a Topaz SignatureGem Signature Pad that uses an .ocx
> ActiveX Controller. However, I don't know how to import and use an
> ActiveX Controller. One of my co-workers has written an app in VB that
> uses this file and so I know the commands once I can import it, but I
> just need to know how to use an ActiveX Controller. Any help would be
> appreciated.

If it really is a control with a GUI, then it is a bit harder - Python
doesn't have full support for that yet.  To use an OCX, you need to see
either the pythonwin\pywin\demos\ocx demos (which unfortunately were not
included in builds 200 and later - see then via the cvs at sourceforge.)  I
believe wxPython also has OCX support.

If it displays no GUI, then all you needs is its "prog ID" - ie, its name -
and use win32com.client.Dispatch(name)

Mark.



More information about the Python-win32 mailing list