T
TazCoder
I have a problem with multithreading. The error I keep getting is that
findFileButton_Click(...) is not a member function. But when I take
the parameters out of the findFileButton_Click(...) inside the
ThreadStart it says that the method is not found, and parameters do not
match. How can I get around this to multithread my application?
Having either this, or sender makes no difference in the maethod.
Thanks for all help. (Sorry for the formatting It will not come out
any better then this)
private: System::Void findFileButton_Click1(System::Object * sender,
System::EventArgs * e)
{
searchThread = new Thread(new
ThreadStart(this,findFileButton_Click(sender,e)));
searchThread->Start();
}
private: System::Void findFileButton_Click(System::Object * sender,
System::EventArgs * e)
{
//code here
}
findFileButton_Click(...) is not a member function. But when I take
the parameters out of the findFileButton_Click(...) inside the
ThreadStart it says that the method is not found, and parameters do not
match. How can I get around this to multithread my application?
Having either this, or sender makes no difference in the maethod.
Thanks for all help. (Sorry for the formatting It will not come out
any better then this)
private: System::Void findFileButton_Click1(System::Object * sender,
System::EventArgs * e)
{
searchThread = new Thread(new
ThreadStart(this,findFileButton_Click(sender,e)));
searchThread->Start();
}
private: System::Void findFileButton_Click(System::Object * sender,
System::EventArgs * e)
{
//code here
}