Click here to Skip to main content
15,888,984 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML to ObservableCollection Pin
VickyC#9-Jul-09 6:50
VickyC#9-Jul-09 6:50 
GeneralRe: XML to ObservableCollection Pin
VickyC#9-Jul-09 7:06
VickyC#9-Jul-09 7:06 
GeneralRe: XML to ObservableCollection Pin
Jeremy Likness9-Jul-09 7:14
professionalJeremy Likness9-Jul-09 7:14 
GeneralRe: XML to ObservableCollection Pin
VickyC#9-Jul-09 7:35
VickyC#9-Jul-09 7:35 
GeneralRe: XML to ObservableCollection Pin
VickyC#9-Jul-09 7:43
VickyC#9-Jul-09 7:43 
QuestionCross Domain Connection Error Pin
javab9-Jul-09 6:07
javab9-Jul-09 6:07 
QuestionPanel Issues Pin
aei_totten9-Jul-09 4:55
aei_totten9-Jul-09 4:55 
AnswerRe: Panel Issues Pin
Luc Pattyn9-Jul-09 9:26
sitebuilderLuc Pattyn9-Jul-09 9:26 
Hi,

Threads (all kinds of them, including ThreadPool threads, and BackgroundWorkers) other than the thread that created a Control (BTW: a Form is also a Control), should not access that Control, except for the very few members explicitly allowed, including InvokeRequired and Invoke.

Before .NET 2.0 the app may behave badly, the GUI may freeze, anything can go wrong if you violate the rule.

Since 2.0 you get an InvalidOperationException by default; you can disable that by setting Control.CheckForIllegalCrossThreadCalls false, but that is a very bad idea, and it brings you back in the previous situation.

Since most if not all Controls are somehow related (they are on a Form, one Form owns another Form, etc), the natural consequence is all Controls get created and accessed exclusively by a single thread, typically your initial or main thread, often also called the "GUI thread".

There are lots of examples on InvokeRequired/Invoke available everywhere;
a rather advanced article on the subject is here.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.

AnswerRe: Panel Issues Pin
aei_totten9-Jul-09 10:27
aei_totten9-Jul-09 10:27 
GeneralRe: Panel Issues Pin
aei_totten9-Jul-09 10:48
aei_totten9-Jul-09 10:48 
QuestionHow to convert html to image using webbrowser? Pin
jacekzorek9-Jul-09 4:45
jacekzorek9-Jul-09 4:45 
AnswerRe: How to convert html to image using webbrowser? Pin
Christian Graus9-Jul-09 4:53
protectorChristian Graus9-Jul-09 4:53 
AnswerRe: How to convert html to image using webbrowser? Pin
DoctorMick9-Jul-09 5:05
DoctorMick9-Jul-09 5:05 
AnswerRe: How to convert html to image using webbrowser? Pin
0x3c09-Jul-09 6:33
0x3c09-Jul-09 6:33 
GeneralRe: How to convert html to image using webbrowser? Pin
jacekzorek9-Jul-09 23:42
jacekzorek9-Jul-09 23:42 
QuestionEdge Detection in image to measure size [modified] Pin
shultas9-Jul-09 3:36
shultas9-Jul-09 3:36 
AnswerRe: Edge Detection in image to measure size Pin
Sun Rays9-Jul-09 3:49
Sun Rays9-Jul-09 3:49 
GeneralRe: Edge Detection in image to measure size Pin
shultas9-Jul-09 4:08
shultas9-Jul-09 4:08 
GeneralRe: Edge Detection in image to measure size Pin
Christian Graus9-Jul-09 4:29
protectorChristian Graus9-Jul-09 4:29 
GeneralRe: Edge Detection in image to measure size Pin
shultas9-Jul-09 4:54
shultas9-Jul-09 4:54 
GeneralRe: Edge Detection in image to measure size Pin
OriginalGriff9-Jul-09 5:09
mveOriginalGriff9-Jul-09 5:09 
QuestionWMI/ADO for Microsoft Exchange Server 2010 Pin
tom groezer9-Jul-09 3:19
tom groezer9-Jul-09 3:19 
QuestionTesting for current PictureBox.Image Pin
kanchoette9-Jul-09 3:16
kanchoette9-Jul-09 3:16 
AnswerRe: Testing for current PictureBox.Image Pin
Christian Graus9-Jul-09 3:18
protectorChristian Graus9-Jul-09 3:18 
AnswerRe: Testing for current PictureBox.Image Pin
Sun Rays9-Jul-09 3:39
Sun Rays9-Jul-09 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.