Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ActiveX DLL and Event Handler
Message
From
23/02/2004 13:46:54
Chris Hui
www.adv-plus.com
Kwun Tong, Hong Kong
 
 
To
All
General information
Forum:
Visual Basic
Category:
ActiveX controls
Title:
ActiveX DLL and Event Handler
Miscellaneous
Thread ID:
00880021
Message ID:
00880021
Views:
50
Hi all,

I have wrote a ActiveX DLL using VB6. And then I wrote a client program which use this ActiveX DLL

Here is the sample code for the client program

==========================
Option Explicit

Private WithEvents aa As BossCheckerOject.IQueryCmd
Private WithEvents bb As BossCheckerOject.IQueryCmd

Private Sub aa_DataArrival()
MsgBox "aaaa"
End Sub

Private Sub bb_DataArrival()
MsgBox "bbbbb"
End Sub

Private Sub Command1_Click()
Set aa = New BossCheckerOject.IQueryCmd
Set bb = New BossCheckerOject.IQueryCmd

aa.strBossIp = "127.0.0.1"
aa.strBossPort = "10000"
aa.m_intLocaleId = 2052
aa.SetRequestMsg "20050", "13922200525~6006~1"

aa.SendQuery
End Sub

Private Sub Form_Unload(Cancel As Integer)
Set aa = Nothing
Set bb = Nothing

End Sub
===================

The object I wrote "BossCheckerOject.QueryCmd" would fire a DataArrival event. I used the "aa" object to send a query out. I expected that I should received an event from the "aa" object. But then the event handler of "bb" handle the event.

Do you have any idea of what's going on?

Thanks in advance...

Chris
Reply
Map
View

Click here to load this message in the networking platform