Click here to Skip to main content
15,887,027 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Accessing control from a different thread Pin
piul14-Feb-11 23:41
piul14-Feb-11 23:41 
AnswerRe: Accessing control from a different thread Pin
Simon_Whale14-Feb-11 23:59
Simon_Whale14-Feb-11 23:59 
AnswerRe: Accessing control from a different thread Pin
Luc Pattyn15-Feb-11 3:14
sitebuilderLuc Pattyn15-Feb-11 3:14 
QuestionExternal process stops everything else Pin
piul14-Feb-11 0:31
piul14-Feb-11 0:31 
AnswerRe: External process stops everything else Pin
Luc Pattyn14-Feb-11 1:06
sitebuilderLuc Pattyn14-Feb-11 1:06 
GeneralRe: External process stops everything else Pin
piul14-Feb-11 2:25
piul14-Feb-11 2:25 
GeneralRe: External process stops everything else Pin
Luc Pattyn14-Feb-11 2:37
sitebuilderLuc Pattyn14-Feb-11 2:37 
GeneralRe: External process stops everything else Pin
piul14-Feb-11 4:34
piul14-Feb-11 4:34 
I like the idea of having the process in a different thread. It does work much better.

However I have a problem when it comes to display in my form the text captured from the process. I have a delegate superMinerThreadWorkCompleted in charge of displaying the results.
void superMinerThreadWorkCompleted (System::Object^ sender, System::ComponentModel::DoWorkEventArgs^ e)
{
  textBox = "Process text";
}

But I get the error
C3352: superMinerThreadWorkCompleted(System::Object ^,System::ComponentModel::DoWorkEventArgs ^)' : the specified function does not match the delegate type 'void (System::Object ^,System::ComponentModel::RunWorkerCompletedEventArgs ^)'<br />
1>Form1.cpp
in the line
superMinerThread->RunWorkerCompleted += gcnew System::ComponentModel::RunWorkerCompletedEventHandler (&Form1::superMinerThreadWorkCompleted);


I can fix this by making the delegate static but then I cannot modify member class textBox.

What could be the way around this?
AnswerRe: External process stops everything else Pin
Luc Pattyn14-Feb-11 4:43
sitebuilderLuc Pattyn14-Feb-11 4:43 
GeneralRe: External process stops everything else Pin
piul14-Feb-11 5:08
piul14-Feb-11 5:08 
GeneralRe: External process stops everything else Pin
Luc Pattyn14-Feb-11 5:51
sitebuilderLuc Pattyn14-Feb-11 5:51 
GeneralRe: External process stops everything else Pin
piul14-Feb-11 5:59
piul14-Feb-11 5:59 
QuestionInfinite recursion wont go away. Pin
Herboren13-Feb-11 13:27
Herboren13-Feb-11 13:27 
AnswerRe: Infinite recursion wont go away. Pin
Dave Kreskowiak13-Feb-11 15:38
mveDave Kreskowiak13-Feb-11 15:38 
AnswerRe: Infinite recursion wont go away. Pin
Luc Pattyn14-Feb-11 1:10
sitebuilderLuc Pattyn14-Feb-11 1:10 
JokeRe: Infinite recursion wont go away. Pin
musefan14-Feb-11 5:15
musefan14-Feb-11 5:15 
GeneralRe: Infinite recursion wont go away. Pin
Henry Minute14-Feb-11 5:24
Henry Minute14-Feb-11 5:24 
JokeRe: Infinite recursion wont go away. Pin
musefan14-Feb-11 5:44
musefan14-Feb-11 5:44 
GeneralRe: Infinite recursion wont go away. Pin
Henry Minute14-Feb-11 5:49
Henry Minute14-Feb-11 5:49 
GeneralRe: Infinite recursion wont go away. Pin
musefan14-Feb-11 6:04
musefan14-Feb-11 6:04 
QuestionClick on the hyperlink and become an alert icon and also save to database Pin
Peggie199013-Feb-11 12:53
Peggie199013-Feb-11 12:53 
QuestionHow to Detect Music Device Pin
Pranit Kothari11-Feb-11 19:15
Pranit Kothari11-Feb-11 19:15 
AnswerRe: How to Detect Music Device - Repost Pin
Richard MacCutchan11-Feb-11 21:10
mveRichard MacCutchan11-Feb-11 21:10 
QuestionsessionState Pin
MWRivera11-Feb-11 6:43
MWRivera11-Feb-11 6:43 
AnswerRe: sessionState Pin
Not Active11-Feb-11 8:54
mentorNot Active11-Feb-11 8:54 

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.