473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

VB ActiveX EXE & Python

Hi..
I can't speak english very well.

I have writting code a program with VB & Python

- COM Server : Visual basic (ActiveX EXE)
- COM Client : Python

I expect to attempt that is retrieved a return value.
but, don't returned a event value ( in python)
why?
I amd certain to need help.


>>> python source
Expand|Select|Wrap|Line Numbers
  1. import win32com
  2.  
  3. class VBEventHandler:
  4.     def OnActionButton(self,id):
  5.             print "event vbmodeless", id
  6.  
  7. obj = win32com.client.DispatchWithEvents("VBnM3Test5.WithEventForm",VBEventHandler)
  8.  
  9. obj.Show()
>>> VB Source : ActvieX Exe (with form(vbmodeless) & events)

Expand|Select|Wrap|Line Numbers
  1. Event OnActionButton(ByVal id As Integer)
  2. Private WithEvents Wef As Form1
  3.  
  4. Private Sub Class_Initialize()
  5.     Set Wef = New Form1
  6. End Sub
  7.  
  8. Public Sub Show()
  9.     Wef.Show
  10. End Sub
  11.  
  12. Private Sub Wef_OnActionButton(ByVal id As Integer)
  13.     RaiseEvent OnActionButton(id)
  14. End Sub
Apr 27 '09 #1
0 1851

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Shi Sherebrin | last post by:
A colleague wants some functionality that I've built in a Python class available to 'drop' into her Visual C++ project. Some time ago she gave up on trying to use 'regular' COM servers, since...
1
by: wang xiaoyu | last post by:
Hello: i want use activex in wxpython program,but when i use MakeActiveXClass an exception occurs. this is my source code dealing the DICOM ocx.I must note that in this program "hwtxcontrol" is...
4
by: angel | last post by:
Hi I want to write an ActiveX by using python. And I know how do, but I don't know how python to access DHTML Document.If using cpp, it can be done by following source. /****/...
1
by: whimsica | last post by:
I'm investingating a c++ api, Panda3d.com, that has a python binding. I want to convert this api into an ACtiveX control so it will run on the web. When I do so I want to use Microsoft Script...
0
by: Sunil George | last post by:
SUB: My ATL com activex control not working in C# & VB .net Hello ! I have a ATL COM activex control developed in ATL 3.0 ( VS 6.0 ) . It works fine in VB 6.0 but when I tested it in C# & VB...
2
by: MartyInOz | last post by:
Hi, I'm currently running Crystal Reports 8.5 from PHP using COM..(yes I know that is an older version of Crystal)...I am also running PHP on localhost. The following code: <?php $crapp =...
2
by: vml | last post by:
I have an application that I want to automatised trough a COM layer or (DCOM)... I can access to all the method of the COM objects with python and win32com when this application is running.... ...
0
by: vml | last post by:
Hello, I am trying to mograte from vb 6 to python. I have a very usefull AX control. It can be : -just a bitmap -an active picture where you can plot data and put cursors -a data explorer ...
2
by: deccio | last post by:
I have create an activex Control with Visual studio 2005 and framework 2.0 in c# to add drag & drop functionality to upload multi file. When I use it in a windows form it work fine. Infact if I...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.