Click here to Skip to main content
15,896,278 members
Home / Discussions / C#
   

C#

 
SuggestionRe: Does anyone know the C# implementation for this? Pin
Richard MacCutchan12-Feb-21 1:15
mveRichard MacCutchan12-Feb-21 1:15 
AnswerRe: Does anyone know the C# implementation for this? Pin
OriginalGriff12-Feb-21 2:07
mveOriginalGriff12-Feb-21 2:07 
AnswerRe: Does anyone know the C# implementation for this? Pin
Luc Pattyn12-Feb-21 3:37
sitebuilderLuc Pattyn12-Feb-21 3:37 
AnswerRe: Does anyone know the C# implementation for this? Pin
Gerry Schmitz12-Feb-21 9:21
mveGerry Schmitz12-Feb-21 9:21 
QuestionHow to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 7:10
Alex Dunlop11-Feb-21 7:10 
AnswerRe: How to access GUI from another thread? Pin
Gerry Schmitz11-Feb-21 7:39
mveGerry Schmitz11-Feb-21 7:39 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 7:40
Alex Dunlop11-Feb-21 7:40 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 8:07
Alex Dunlop11-Feb-21 8:07 
GeneralRe: How to access GUI from another thread? Pin
Dave Kreskowiak11-Feb-21 13:17
mveDave Kreskowiak11-Feb-21 13:17 
AnswerRe: How to access GUI from another thread? Pin
Gerry Schmitz11-Feb-21 9:03
mveGerry Schmitz11-Feb-21 9:03 
AnswerRe: How to access GUI from another thread? Pin
Ralf Meier11-Feb-21 10:36
mveRalf Meier11-Feb-21 10:36 
AnswerRe: How to access GUI from another thread? PinPopular
Luc Pattyn11-Feb-21 11:29
sitebuilderLuc Pattyn11-Feb-21 11:29 
GeneralRe: How to access GUI from another thread? Pin
Eddy Vluggen11-Feb-21 14:01
professionalEddy Vluggen11-Feb-21 14:01 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 18:18
Alex Dunlop11-Feb-21 18:18 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 19:39
Alex Dunlop11-Feb-21 19:39 
AnswerMessage Closed Pin
11-Feb-21 14:18
professionalEddy Vluggen11-Feb-21 14:18 
GeneralRe: How to access GUI from another thread? Pin
Alex Dunlop11-Feb-21 18:16
Alex Dunlop11-Feb-21 18:16 
QuestionJsonConvert.DeserializeObject Pin
Member 1449252210-Feb-21 21:43
Member 1449252210-Feb-21 21:43 
AnswerRe: JsonConvert.DeserializeObject Pin
OriginalGriff10-Feb-21 22:05
mveOriginalGriff10-Feb-21 22:05 
AnswerRe: JsonConvert.DeserializeObject Pin
Member 1449252211-Feb-21 4:13
Member 1449252211-Feb-21 4:13 
AnswerRe: JsonConvert.DeserializeObject Pin
James Curran11-Feb-21 23:58
James Curran11-Feb-21 23:58 
GeneralRe: JsonConvert.DeserializeObject Pin
Member 1449252212-Feb-21 7:08
Member 1449252212-Feb-21 7:08 
QuestionBackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 4:13
Alex Dunlop10-Feb-21 4:13 
AnswerRe: BackGroundWorker gives runtime error Pin
OriginalGriff10-Feb-21 4:36
mveOriginalGriff10-Feb-21 4:36 
You cannot access UI controls from any other thread than the original UI thread: if you try, you will cause a Cross Threading Exception.
So when you do this:
C#
progressPanel1.Visible = true;
in the BackgroundWorker DoWork event, you will immediately error the thread.

The BackgroundWorker includes progress reporting, which is automatically routed back to the UI thread so it is entirely safe to access controls from the ProgressChanged event[^]. But not from anywhere else!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

GeneralRe: BackGroundWorker gives runtime error Pin
Alex Dunlop10-Feb-21 4:44
Alex Dunlop10-Feb-21 4:44 

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.