473,395 Members | 1,968 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,395 software developers and data experts.

Simple multithreading

I have some code that iterates through a directry doing stuff and I would
like to get the results text box I have on the windows form, to update
accordingly. I have a progress bar that was working fine but when I put the
textbox on the form the whole form blanks until the processing is complete.

How would I go about using threads to keep the form components updating
themselves?

Thanks for any help,
Grant
Jul 21 '05 #1
4 1061
Here's a primer on multi-threading by Chris Sells
http://msdn.microsoft.com/library/de...ms06112002.asp

Juval Lowy has a good component for running background tasks called
BackGroundWorker:
http://www.idesign.net/idesign/Deskt...ndex=5&tabid=8

HTH,
Jorge

"Grant" wrote:
I have some code that iterates through a directry doing stuff and I would
like to get the results text box I have on the windows form, to update
accordingly. I have a progress bar that was working fine but when I put the
textbox on the form the whole form blanks until the processing is complete.

How would I go about using threads to keep the form components updating
themselves?

Thanks for any help,
Grant

Jul 21 '05 #2
You are thinking about using
a = new System.Threading.Thread( addressof somesub )
a.start

?
Jul 21 '05 #3
Thanks Jorge,
Some useful info on that msdn link...

"Jorge Matos" <Jo********@discussions.microsoft.com> wrote in message
news:E2**********************************@microsof t.com...
Here's a primer on multi-threading by Chris Sells:
http://msdn.microsoft.com/library/de...ms06112002.asp

Juval Lowy has a good component for running background tasks called
BackGroundWorker:
http://www.idesign.net/idesign/Deskt...ndex=5&tabid=8

HTH,
Jorge

"Grant" wrote:
I have some code that iterates through a directry doing stuff and I would
like to get the results text box I have on the windows form, to update
accordingly. I have a progress bar that was working fine but when I put
the
textbox on the form the whole form blanks until the processing is
complete.

How would I go about using threads to keep the form components updating
themselves?

Thanks for any help,
Grant

Jul 21 '05 #4
Yeah something real simple like that. I need to be able to have two threads,
thread A updates the windows form components, textbox and progress bar, and
Thread B does all the work (Occasionally telling Thread A where its at).

"Doker" <do****@wp.pl> wrote in message
news:d1**********@node2.news.atman.pl...
You are thinking about using
a = new System.Threading.Thread( addressof somesub )
a.start

?

Jul 21 '05 #5

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

Similar topics

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....
16
by: Robert Zurer | last post by:
Can anyone suggest the best book or part of a book on this subject. I'm looking for an in-depth treatment with examples in C# TIA Robert Zurer robert@zurer.com
5
by: sarge | last post by:
I would like to know how to perform simple multithreading. I had created a simple form to test out if I was multithreading properly, but got buggy results. Sometime the whole thig would lock up...
2
by: sergejusz | last post by:
Hi all, Please take a look at simple set of VB.NET classes to develop "boss-workers"- style multithreading applications. Maybe it will help somebody: http://www.sergejusz.com/boss_workers.htm ...
7
by: Ray | last post by:
Hello, Greetings! I'm looking for a solid C++ multithreading book. Can you recommend one? I don't think I've seen a multithreading C++ book that everybody thinks is good (like Effective C++ or...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.