473,586 Members | 2,702 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

communicate with progressbar

Is there a way for code from one class of C# to send a communication to a
progressbar in another class to update the bar during runtime?
--
Steve
Nov 16 '05 #1
3 4351
Yes, one option is that you have an instance of the progressbar's class, and
that instance of a class is exposing some method to allow updating the
progress bar's value.

Another option, is to fire an event for value updating from one class and
handle it in the progressbar's class.

"Steve Teeples" <St**********@d iscussions.micr osoft.com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
Is there a way for code from one class of C# to send a communication to a
progressbar in another class to update the bar during runtime?
--
Steve

Nov 16 '05 #2
Hi Steve,

You could use any of these steps:
1. Either expose a public method in the class which would accept a value for
the progress.
2. Call a delegate passing the value, which is hooked into a method which
updates the progress bar
3. Call an event of the delegate type, passing the value.

HTH,
- Rakesh Rajan

"Steve Teeples" <St**********@d iscussions.micr osoft.com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
Is there a way for code from one class of C# to send a communication to a
progressbar in another class to update the bar during runtime?
--
Steve

Nov 16 '05 #3
I've read up on delegates and think this specific method fit nicely with the
way I am designing my code. Thanks for both of you for your assistance.

"Rakesh Rajan" wrote:
Hi Steve,

You could use any of these steps:
1. Either expose a public method in the class which would accept a value for
the progress.
2. Call a delegate passing the value, which is hooked into a method which
updates the progress bar
3. Call an event of the delegate type, passing the value.

HTH,
- Rakesh Rajan

"Steve Teeples" <St**********@d iscussions.micr osoft.com> wrote in message
news:89******** *************** ***********@mic rosoft.com...
Is there a way for code from one class of C# to send a communication to a
progressbar in another class to update the bar during runtime?
--
Steve


Nov 16 '05 #4

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

Similar topics

1
332
by: Maka Sili | last post by:
Using ProgressBar.Enabled = false does not dim the progress bar. There must be a way. I hope somebody could guide me. Thanks.
2
4808
by: Thomas Kehl | last post by:
Hi! Does anyone have a tipp for me where can I found (or how can I programm) a "progressbar" which has a gradient and the color go from the left side to right and back ... I should have a waiting-progressbar :-) Thanks Thomas
2
6293
by: jez123456 | last post by:
Hi, thanks for the previous advice on progressbars with showing the percentage. I would now like to create a less clunky version. I.e at the moment my progressbar shows 7 separate steps. Some steps can take seconds to process, but others could take upto 10 minutes (leaving the users thinking nothing is happening!). Is there a way to show...
8
19598
by: needin4mation | last post by:
Please consider: foreach (ListViewItem item in listViewFiles.Items) { // Display the ProgressBar control. pBar1.Visible = true; // Set Minimum to 1 to represent the first file being copied. pBar1.Minimum = 1; // Set Maximum to the total number of files to copy. pBar1.Maximum = 4; //filenames.Length;
1
5402
by: Mehr H | last post by:
I've been trying to figure out how i can embed a Windows.Forms.ProgressBar in my webform (aspx) file. I have tried putting a Windows.Forms.ProgressBar as public on a regular winform designer form (form called ProgressForm) and the built the dll. Then I reference this new assembly from within my asp.net applicaiton and tried to access...
3
4779
by: Mitchell Vincent | last post by:
In other programming languages I've been able to easily change the style of a progress bar between smooth and blocked. I find that is either really hidden or impossible in .NET. Am I missing something? I'm shocked that .NET doesn't have a style property for the progressbar control! -- - Mitchell Vincent - kBilling - An easy and...
1
696
by: nobody | last post by:
Hi I'm currently developing a Windows application. At the start of the application I load several tables into datatables in a dataset. I also use a progressbar to show the user how much percent of the total is already loaded. But I do this in a dirty way: I increment the progressbar with the same number after each table, but not all tables...
2
11106
by: =?Utf-8?B?QWFyb24=?= | last post by:
Since some controls such as the DataGridView take a long time to update themselves when performing certain tasks, I have added a StatusStrip with a ProgressBar on it. While I am updating the controls on the form, I want the ProgressBar to scroll in marquee mode. However, I cannot seem to get this to work. I set the StatusStripLabel to the...
4
2504
by: sivamoorthy | last post by:
how to use a progressbar in a one cpp file but defined in another header file. the function in which i am using is a static member function. how to use the progressbar inside the function code: file name : flash.cpp void CFlasher::OnStartDownload (void *pDublicate) { bValueRet = DeviceIoControl (hHandle, \ (DWORD)...
0
7911
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8200
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8338
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8215
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3864
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1448
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.