[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Thread Safe: Event

Posted on 2009-05-09
3
Medium Priority
?
424 Views
Last Modified: 2013-12-17
I use events in my methods and what I like to know is, must I do something to make the events thread-safe or are the already that by default?
0
Comment
Question by:AWestEng
3 Comments
 
LVL 33

Accepted Solution

by:
hongjun earned 1500 total points
ID: 24343236
How to: Make Thread-Safe Calls to Windows Forms Controls
http://msdn.microsoft.com/en-us/library/ms171728.aspx

hongjun
0
 
LVL 6

Expert Comment

by:SaedSalman
ID: 24343772
at the constructor add this line of code:
Control.CheckForIllegalCrossThreadCalls = true;

CheckForIllegalCrossThreadCalls is enabled by default is visual studio 2005
0
 
LVL 1

Author Closing Comment

by:AWestEng
ID: 31579746
Not exactly what I was looking for, but maybe my fault. thx anyway
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month17 days, 14 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question