Solved

Thread Safe: Event

Posted on 2009-05-09
3
413 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 500 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now