Re: Firing Events from Modile containing a Threads code
From: Chris Tacke, eMVP (ctacke_at_spamfree-opennetcf.org)
Date: 05/24/04
- Next message: James Anderson: "Re: Firing Events from Modile containing a Threads code"
- Previous message: Dueguard: "Error Code: 80040154 using RDA"
- In reply to: James Anderson: "Firing Events from Modile containing a Threads code"
- Next in thread: James Anderson: "Re: Firing Events from Modile containing a Threads code"
- Reply: James Anderson: "Re: Firing Events from Modile containing a Threads code"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 May 2004 10:00:10 -0400
Take a look at this:
http://www.codeproject.com/vb/net/StepByStepEventsInVBNET.asp
-- Chris Tacke, eMVP Co-Founder and Advisory Board Member www.OpenNETCF.org --- --- Principal Partner OpenNETCF Consulting www.OpenNETCF.com "James Anderson" <anonymous@discussions.microsoft.com> wrote in message news:AE05DCEF-29FE-4B41-90A1-CFDD2722096B@microsoft.com... > Hi, > > Ive been advised to use events in my app. I have a worker thread that listens for UDP packets. It converts the incoming UDP Byte array into a Packet object. This then gets placed onto a ReceivedPackets Queue. Im not too familiar with Events but need to know how to get my thread to fire the event and my form, could 1 of 9 forms, to detect that event has been fired and handle it. > > I know that I should use "RaiseEvent" in the Thread. The thread has been declared in a Module. How do I put it all together? I guess the forms need something like "AddHandler EventName, New EventHandler Addressof procedureToRun" but donr know how to put it all together. I tried but the Thread was complaining of an "End of statement expected" compilor error. > > Also, If Ive received 2 packets with a 200ms interval between them and hence the event gets fired twice, what happens? does the app wait for the first procedure to finish executing and then call the method again in response to the second event firing? Can this cause potential delay/problems in my app? > > Im using VB.NET but C# will suffice. > > Thanks.
- Next message: James Anderson: "Re: Firing Events from Modile containing a Threads code"
- Previous message: Dueguard: "Error Code: 80040154 using RDA"
- In reply to: James Anderson: "Firing Events from Modile containing a Threads code"
- Next in thread: James Anderson: "Re: Firing Events from Modile containing a Threads code"
- Reply: James Anderson: "Re: Firing Events from Modile containing a Threads code"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|