Click here to Skip to main content
15,889,768 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 8:17
User 680178015-Feb-10 8:17 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Nicholas Butler15-Feb-10 8:37
sitebuilderNicholas Butler15-Feb-10 8:37 
JokeRe: Cross-Threading problem, InvokeRequired and Events Pin
Wes Aday15-Feb-10 9:25
professionalWes Aday15-Feb-10 9:25 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Wes Aday15-Feb-10 11:10
professionalWes Aday15-Feb-10 11:10 
AnswerRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 8:37
sitebuilderLuc Pattyn15-Feb-10 8:37 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 9:55
User 680178015-Feb-10 9:55 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 10:01
sitebuilderLuc Pattyn15-Feb-10 10:01 
QuestionRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 10:23
User 680178015-Feb-10 10:23 
The thing is that if logOption is set to false, the events and delegates are not going to be activated, boosting the speed of calculations (as intended). However, If i will not add
Application.DoEvents()

to
private void trainingANN_instance_LogReportSynch(string stringname)
 {
     if (this.InvokeRequired)
     {
         DelegateToCrossThread_String del = new DelegateToCrossThread_String(trainingANN_instance_LogReportSynch);
         this.Invoke(del);
     }
     else
     {
         //Application.DoEvents();
         this.tbVeryBig.Text += stringname;
     }
 }


that text box wont be updated. Also, if logoption is false, these do no appear in the textbox, however, console shows them

this.tbVeryBig.Text += "[" + DateTime.Now.TimeOfDay.ToString() + "]: txt [" + inN+ "]\r\n";


modified 1-Aug-19 21:02pm.

AnswerRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 10:32
sitebuilderLuc Pattyn15-Feb-10 10:32 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 10:38
User 680178015-Feb-10 10:38 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 11:30
sitebuilderLuc Pattyn15-Feb-10 11:30 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178015-Feb-10 10:45
User 680178015-Feb-10 10:45 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn15-Feb-10 11:23
sitebuilderLuc Pattyn15-Feb-10 11:23 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 8:41
Daniel Grunwald16-Feb-10 8:41 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn16-Feb-10 9:06
sitebuilderLuc Pattyn16-Feb-10 9:06 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:26
Daniel Grunwald16-Feb-10 9:26 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 9:42
User 680178016-Feb-10 9:42 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:49
Daniel Grunwald16-Feb-10 9:49 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 9:52
User 680178016-Feb-10 9:52 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:59
Daniel Grunwald16-Feb-10 9:59 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 10:31
User 680178016-Feb-10 10:31 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 8:45
Daniel Grunwald16-Feb-10 8:45 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 9:08
User 680178016-Feb-10 9:08 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Daniel Grunwald16-Feb-10 9:39
Daniel Grunwald16-Feb-10 9:39 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
Luc Pattyn16-Feb-10 9:45
sitebuilderLuc Pattyn16-Feb-10 9:45 

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.