473,326 Members | 2,173 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,326 software developers and data experts.

Threading & Windows Controls ..

Hi,

Someone not so long ago has writed some example for thread safe ListBox Add
method, this nice code was :
delegate void AddToListBoxDelegate(String item);
// ...
if(listBox.InvokeRequired)
{
// Called from another thread ...
_listBox.Invoke(new AddToListBoxDelegate(Add,new Object[] {"Hello"}));
}
else
{
_listBox.Items.Add("Hello");
}
// ...

public void Add(String item)
{
_listBox.Items.Add(item);
}

Thanks to Aravind !

Now, when we should make controls thread safe, I assume that ever one single
method should be thread-safe in such a way. My thought go right that:
1. so let's make a nice overide classes for this controls
2. hey, there is so many of these
3. hym... there must be some one who did it ;-)

So, is 1.2 Framework ship with this ? Or maybe someone know a pack o classes
made exacly for this purpose ??
Any help needed, please ;-)

--
regards
stic
Nov 15 '05 #1
0 831

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

Similar topics

6
by: MPH Computers | last post by:
Hi I am looking for some help on Threading and Critical Sections I have a main thread that controls an event the event handler creates a new thread for carrying out the work because the...
0
by: Eric Sabine | last post by:
OK, I'm trying to further my understanding of threading. The code below I wrote as kind of a primer to myself and maybe a template that I could use in the future. What I tried to do was pass data...
3
by: Keith Mills | last post by:
Hello, please find attached a basic outline of what I am attempting to accomplish... basically I want to create a number of THREADS (which I can do fine), but I then need a method for them to be...
0
by: Colmeister | last post by:
I recently read Jason Clark's excellent article on Unhandled Exceptions (http://msdn.microsoft.com/msdnmag/issues/04/06/NET/default.aspx) and have attempted to incorporate the features he talks...
3
by: Toe Dipper | last post by:
In short we have a lengthy process when a form is loaded that adds activex controls to our windows form. This process in itself works fine however we would like to push this processing to a thread...
14
by: Simon Verona | last post by:
I think I'm doing this wrong : I have a class with a public shared method such as follows: public shared sub myFunction dim frm as new myFrm dim t as new Threading.Thread(Addressof ...
7
by: Mike P | last post by:
I am trying to write my first program using threading..basically I am moving messages from an Outlook inbox and want to show the user where the process is up to without having to wait until it has...
4
by: hooksie2 | last post by:
Hi, I am trying to use FileSystemWatcher to watch a log file which is written to via a 3rd party app and display the log in listbox on a form. The FileSystemWatch seems to work okay but I get...
9
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.