473,805 Members | 1,939 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

BackGroundWorke r.ReportProgres s method doesn't accept strings

Does someone know why BackGroundWorke r.ReportProgres s method doesn't
accept strings ?

You can't pass integer always for a progress meter as percentage
completed cannot be calculated in many tasks like logging on to a
remote computer. In that case, we would like just to show a message
"Logging on"....

Any ideas ??

Nov 16 '06 #1
2 2613
The second paramter is an object, you can pass anything in it. I normally
pass a class which allows for more detail then a message but you could also
pass a stucture or just a string.

Regards,
John

"jimmy" <ac**********@g mail.comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
Does someone know why BackGroundWorke r.ReportProgres s method doesn't
accept strings ?

You can't pass integer always for a progress meter as percentage
completed cannot be calculated in many tasks like logging on to a
remote computer. In that case, we would like just to show a message
"Logging on"....

Any ideas ??

Nov 16 '06 #2
Thanks, John I have completed my project as you told
John J. Hughes II wrote:
The second paramter is an object, you can pass anything in it. I normally
pass a class which allows for more detail then a message but you could also
pass a stucture or just a string.

Regards,
John

"jimmy" <ac**********@g mail.comwrote in message
news:11******** **************@ h54g2000cwb.goo glegroups.com.. .
Does someone know why BackGroundWorke r.ReportProgres s method doesn't
accept strings ?

You can't pass integer always for a progress meter as percentage
completed cannot be calculated in many tasks like logging on to a
remote computer. In that case, we would like just to show a message
"Logging on"....

Any ideas ??
Jan 11 '07 #3

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

Similar topics

3
6175
by: Tim Anderson | last post by:
I've been experimenting with the BackgroundWorker class. As a test, I've built an application that searches for files matching a RegEx and populates a listbox with the results. My approach is to search directories recursviely andcall ReportProgress once per directory or in batches of 10 matching files if there are a lot of results. I pass an ArrayList containing the matching filenames. In the ProgressChanged event handler I add the...
5
14135
by: Rob R. Ainscough | last post by:
I'm using a BackgroundWorker to perform a file download from an ftp site. Per good code design practices where I separate my UI code from my core logic code (in this case my Download file method in my FileIO class) I've established Public Event in my core logic classes along with RaiseEvents (that will updated a progress bar on the UI side). This all works great when I'm NOT using Threading (BackgroundWorker), however, as soon as I...
0
1109
by: WB | last post by:
Hi, My application has a BackgroundWorker component that runs a time-consuming process. I use the ReportProgress() method to increment a ProgressBar. However, in addition to that ProgressBar, I would also like to have a multi-line text box in which I provide more details of the progress by displaying message such as "FIle opened", "Reading contents", "Uploading data" etc. Is there any method in the BackgroundWorker that can take the...
3
3057
by: Hardy Wang | last post by:
Hi all, I am migrating a Windows Form application from .Net 1.1 to 2.0. I try to use BackgroundWorker object to handle a very lengthy process. I have a separated class to handle some very complex logic. In .Net 1.1, I create some events inside this class to notify WinForm the status of process: obj.OneFileStarted += new OneFileStartedEventHandler(obj_OneFileStarted); obj.OneFileFinished += new...
1
3236
by: Bob | last post by:
Hi, I am having trouble seeing how this bolts together. The UI starts a process which involves a long running database update. All Database activity is handled by a class called DT. DT has a progress event. So I added a bw to the form. The Dowork Calls a method which instantiates a DT and calls its Dataprocessing method.
3
4189
by: ray.ackley | last post by:
Hello all, I have an app that uses a BackgroundWorker() object to read USB data that is being fed in serially (FT245R chip, www.ftdichip.com). It looks just like a serial data stream. Anyhow, it reads in the bytes and finds the header and footer and pulls packets out of the data stream. Nice, easy stuff. It then stuffs the packet into into a class I made up to pull the data out through the ProgressChanged event. The class is pretty...
14
6396
by: =?Utf-8?B?SXNobWFlbA==?= | last post by:
Hi, I have a form with a progress bar on it and wanted to use the BackgroundWorker to be able to update the progress. I looked at examples, run some of them, but in debug, when the code gets to the do work method, it stops for a long while and then executes the first line of the method and the doesn't do anything else. What am i doing wrong?
3
4829
by: vulpes | last post by:
How do I implement the "incremental results" with a BackgroundWorker? Many pages, http://msdn2.microsoft.com/en-us/library/wewwczdw.aspx for example, tell that I should subclass the ProgressChangedEventArgs class, but what else? I haven't found any examples. (Why aren't there any?) Right now I have derived my own version of ProgressChangedEventArgs with some extra properties, declared
0
1901
by: PeterSchwennesen | last post by:
Problems starting a Timer Programmatically within a BackgroundWorker. I am trying to start a Timer inside a Backgroundworker. I want to start the BackGroundWorker and then have a timer tick a calculation reppeting inside the BackGroundWorker. The Code below seems to work ok for sending back the informaton "DoWork - Enter" and "DoWork - Exit, but the Timer "Timer_Ping" is newer ticked and the line "Time - Tick" is newer send back. Why is my...
0
9716
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10360
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10105
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5677
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4323
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
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.