473,383 Members | 1,818 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

MultiThreading C++ Windows Forms

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
}

Jul 23 '05 #1
3 2972
TazCoder wrote:
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
}


You should address this question to a Microsoft Windows
specific newsgroup like comp.os.ms-windows.programmer.win32.

The C++ language does not address OS specific API's like
the Win32 Thread.

Larry
Jul 23 '05 #2
<quote>
You should address this question to a Microsoft Windows
specific newsgroup like comp.os.ms-windows.programmer.*win32.

The C++ language does not address OS specific API's like
the Win32 Thread.
</quote>

Please excuse the question, but I would just like to clarify for my own
knowledge: Isn't multi-threading processor specific rather then OS?
Also, is there any plans in the work to add multi-threading to the C++
Standard? (I assumed from your answer that it is not).

Thank you in advance for your replies

Jul 23 '05 #3
m_handler wrote:
<quote>
You should address this question to a Microsoft Windows
specific newsgroup like comp.os.ms-windows.programmer.*win32.

The C++ language does not address OS specific API's like
the Win32 Thread.
</quote>

Well, I'm going to go out on a limb here...
Please excuse the question, but I would just like to clarify for my own
knowledge: Isn't multi-threading processor specific rather then OS?
No. The threading API is provided by the OS. Windows uses (at least)
one threading API, Linux uses a different threading API, Solaris...,
AIX..., etc.
Also, is there any plans in the work to add multi-threading to the C++
Standard? (I assumed from your answer that it is not).
Not that I know of. Anything OS specific is not part of the language.
That does NOT mean that there are no threading libs, just that they
are not part of the 'C' or C++ Language Spec (because they differ from
OS to OS).

Thank you in advance for your replies


Smarter folks than I can correct me and/or provide you with more detail.

Regards,
Larry
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dixp | last post by:
I'm new to writing multithreaded apps and I have a design question. I have a winforms app and a class which has a method that does processing which is time intensive. I want the user to be able...
1
by: Jeff Yang | last post by:
These days,I have read the artile "Safe, Simple Multithreading in Windows Forms, Part 1" on MSDN,and I also runed the example of it....
9
by: Popoxinhxan | last post by:
Dear experts, i want to develop an client application that consume the google search web service. In my MainForm i have a method to retrieve all the search result e.g. GetGoogleResults(). Now i...
2
by: Alper AKCAYOZ | last post by:
Hello, I am developing a TCP/IP Client application in Windows Forms (.NET) template. I use one MDI form as initial form where I connect to server and starts a background thread (thread_A) for...
1
by: Ioannis Vranos | last post by:
I am currently reading a chapter involving multithreading, and some sample code calls Environment::Exit() to terminate the application with all threads. What is the difference from...
5
by: Lucvdv | last post by:
Can anyone explain why this happens with the code at the bottom? It looked like a thread safety issue, but changing the declaration of Label1 to Shared doesn't help. Standard windows form;...
5
by: Boni | last post by:
Dear all, picturebox mouse move seems to start new thread each time it is called. At least I see in debuger many threads. ---Non user code-- Picturebox.MouseMove This seems to spoil my...
6
by: MeowCow | last post by:
I will try and make my question with out being too long winded. I have been doing a lot of reading on how to do multithreading and I have implemented the code from the following example on...
0
by: Need2CSharp | last post by:
Hi All, Following is a quote from an article on MSDN. Article Title: Safe, Simple Multithreading in Windows Forms URL:...
2
by: lewisms | last post by:
Hello all, I am quite new to c++/. Net so please don't shoot me down for being a newbie. Any way I am trying to make a simple multithreading program that is just to learn the ideas behind it...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.