[python-win32] ActiveX components with Events
Mark Hammond
mhammond at skippinet.com.au
Wed Dec 15 23:37:56 CET 2004
> However, I have a problem that one of the methods on the ActiveX
> should show a UI and fire an event. The python code doesn't
> show the UI
> and no events get fired. This does the same thing in VB
> uncles I wait in
> a polling loop for my call to the ActiveX component and use the
> ubiquitous DoEvents call in VB6 - is there something which
> will allow me
> to yield control to the OS in the same way as VB6 in Python.
ActiveX controls need an AX control "container" in order for them to work
correctly. win32com by itself currently can not provide such an
environment. However, Pythonwin and wxPython both can (Pythonwin by virtue
of MFC, wxPython by virtue of wxWindows). I don't know much about
wxPython's support, but see pythonwin\pywin\demos\ocx for examples of how to
do it in pythonwin.
Mark
More information about the Python-win32
mailing list