Solved

Thread Safe GUI, Example in vb.net 2005

Posted on 2007-04-05
3
285 Views
Last Modified: 2008-02-01
I would like an example program that demonstrates the usage of threads to create a program that can update, a statusbarlabel from a different thread.
0
Comment
Question by:MasterThai
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 10

Accepted Solution

by:
Jason Evans earned 125 total points
ID: 18862907
Hi there.

I did the same thing for an app I wrote once, I needed a progress bar to display the status of a task which was running in another thread. To achieve this, I used the .NET 2.0 component called BackgroundWorker. Here are a couple of links to get you going:

http://msdn2.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx
http://www.codeguru.com/columns/vb/article.php/c10755/

Basically the BackgroundWorker is a control that allows you to perform tasks in another thread of execution, whilst your UI carries on responding to user events. Plus the backgroundworker can talk to controls on the form, eg update the value of a progress bar.

Try the links above to get you started, hope this helps.
Jas.
0
 
LVL 2

Author Comment

by:MasterThai
ID: 18864426
I have tried the backgroundworker thread to no avail, I can update most controls, because they allow to be p/invoked I just can't figure out how to update the statusbar
0
 
LVL 2

Author Comment

by:MasterThai
ID: 18864734
Ok well, i figured it out, instead of invoking the control itself i invoked the form and that allowed me to update it.
0

Featured Post

How To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question