|
-
Jun 15th, 2000, 06:29 PM
#1
Thread Starter
Hyperactive Member
I am trying raise a single event but have multiple event handlers for that event.
I have a serial bus which I want to monitor continually (polling) when a packet arrives I want to raise an event that multiple forms can respond to. If the packet is for them they flag this up on the screen.
This is some psedo code of what I have:
Form:
Private withevents handlename as sourceclass
Private sub form_load()
Set handlename as sourceclass
handlename.canread ' start polling
end sub
Private sub handlename_extension ' event handler
label.caption="Packet for me"
endsub
Class: (event source) name=sourceclass
Public event extension()
private sub canread()
wait for packet..
raise event extension
doevents
loop
end sub
The above code works ok except every form has a instance of the class (event source) and I only want one event source running. I have tried varies ways of creating a class outside the form and then refering to it (public withevents) but I cant get it to work.
Any ideas?
Cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|