Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
AnswerMy Vote of 1 Pin
Keith Barrow19-Oct-12 4:32
professionalKeith Barrow19-Oct-12 4:32 
QuestionHow to turn off projectors in c# Pin
ravindervilasagar18-Oct-12 23:50
ravindervilasagar18-Oct-12 23:50 
AnswerRe: How to turn off projectors in c# Pin
Pete O'Hanlon19-Oct-12 0:26
mvePete O'Hanlon19-Oct-12 0:26 
QuestionHow To Determine the strings language Pin
mohammadkaab18-Oct-12 6:26
mohammadkaab18-Oct-12 6:26 
AnswerRe: How To Determine the strings language Pin
Eddy Vluggen18-Oct-12 6:30
professionalEddy Vluggen18-Oct-12 6:30 
AnswerRe: How To Determine the strings language Pin
jschell18-Oct-12 9:34
jschell18-Oct-12 9:34 
AnswerRe: How To Determine the strings language Pin
Richard Deeming18-Oct-12 10:53
mveRichard Deeming18-Oct-12 10:53 
QuestionNeeding help with threads and delegates Pin
turbosupramk318-Oct-12 5:00
turbosupramk318-Oct-12 5:00 
I have worker threads writing to my GUI right now with the following code. My issue is that I'm getting MDA errors (ContextSwitchDeadlock and DisconnectedContext) during debugging and when I close the program, the child threads are still trying to write to controls that are nonexistent anymore, which generates errors as well.

I'm guessing I need to learn the proper way to use a delegate with multithreading/guis, so I was wondering if someone could provide some guidance and the proper/efficient way to communicate to the main form thread, from a child thread.

Thanks for reading!


C#
this.Invoke((MethodInvoker)delegate()
                                    {
                                        // listviewbox updates here
                                        lvwServicesOutput.Items[selectedIndex].SubItems[2].Text = "service not present";
                                    });


this.BeginInvoke((MethodInvoker)delegate()
                    {
                        tbxServerName2.Enabled = false;
                        tbxServerName2.Text = "";
                        tbxServiceName.Enabled = false;
                        tbxServiceName.Text = "";
                        serviceNameList = true;
                    });

AnswerRe: Needing help with threads and delegates Pin
BobJanova18-Oct-12 5:48
BobJanova18-Oct-12 5:48 
GeneralRe: Needing help with threads and delegates Pin
turbosupramk318-Oct-12 6:16
turbosupramk318-Oct-12 6:16 
GeneralRe: Needing help with threads and delegates Pin
BobJanova18-Oct-12 6:58
BobJanova18-Oct-12 6:58 
AnswerRe: Needing help with threads and delegates Pin
Eddy Vluggen18-Oct-12 6:17
professionalEddy Vluggen18-Oct-12 6:17 
GeneralRe: Needing help with threads and delegates Pin
turbosupramk318-Oct-12 6:24
turbosupramk318-Oct-12 6:24 
Questionto send data to an IP address Pin
GzMs18-Oct-12 3:16
GzMs18-Oct-12 3:16 
AnswerRe: to send data to an IP address Pin
Ravi Bhavnani18-Oct-12 3:40
professionalRavi Bhavnani18-Oct-12 3:40 
GeneralRe: to send data to an IP address Pin
GzMs18-Oct-12 4:46
GzMs18-Oct-12 4:46 
GeneralRe: to send data to an IP address Pin
Ravi Bhavnani18-Oct-12 4:57
professionalRavi Bhavnani18-Oct-12 4:57 
AnswerRe: to send data to an IP address Pin
Ingo18-Oct-12 6:06
Ingo18-Oct-12 6:06 
AnswerRe: to send data to an IP address Pin
jschell18-Oct-12 9:39
jschell18-Oct-12 9:39 
QuestionCan save images to a structured text file C#? Pin
Member 245846718-Oct-12 1:27
Member 245846718-Oct-12 1:27 
AnswerRe: Can save images to a structured text file C#? Pin
Eddy Vluggen18-Oct-12 1:39
professionalEddy Vluggen18-Oct-12 1:39 
AnswerRe: Can save images to a structured text file C#? Pin
BobJanova18-Oct-12 5:46
BobJanova18-Oct-12 5:46 
GeneralRe: Can save images to a structured text file C#? Pin
Member 245846721-Nov-12 16:01
Member 245846721-Nov-12 16:01 
Newshow to create send and receive appln Pin
jeny joseph18-Oct-12 0:10
jeny joseph18-Oct-12 0:10 
GeneralRe: how to create send and receive appln Pin
Pete O'Hanlon18-Oct-12 0:41
mvePete O'Hanlon18-Oct-12 0:41 

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.