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

ProgressBar Continus or Marque

I've been sucessful in using the Progress bar when I can calculate the
percent complete. Now I want to use it when I have no way to calculate the
amount of time to completion. Basically, I want to do the following:

progressBar1.Style = ProgressBarStyle.Continuous;
progressBar1.Go();

DoSomething();

progressBar1.Stop();
progressBar1.Style = ProgressBarStyle.Blocks;

What's the right answer for Go() and Stop()?

Thanks,
--
Randy
Sep 5 '06 #1
6 30372
Hello randy1200,

Use cyclic-type progress bars, only indicating that work is in progress

rI've been sucessful in using the Progress bar when I can calculate
rthe percent complete. Now I want to use it when I have no way to
rcalculate the amount of time to completion. Basically, I want to do
rthe following:
r>
rprogressBar1.Style = ProgressBarStyle.Continuous;
rprogressBar1.Go();
rDoSomething();
r>
rprogressBar1.Stop();
rprogressBar1.Style = ProgressBarStyle.Blocks;
rWhat's the right answer for Go() and Stop()?
r>
rThanks,
r>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 5 '06 #2
I'm REALLY looking for how to start and stop a progress bar with the style
set to marque or continuous mode. I'm asking because I can't find this
information in the msdn. A quick description, or a pointer to an msdn page
that contains this information would be really helpful.

Thanks,
--
Randy
"Michael Nemtsev" wrote:
Hello randy1200,

Use cyclic-type progress bars, only indicating that work is in progress

rI've been sucessful in using the Progress bar when I can calculate
rthe percent complete. Now I want to use it when I have no way to
rcalculate the amount of time to completion. Basically, I want to do
rthe following:
r>
rprogressBar1.Style = ProgressBarStyle.Continuous;
rprogressBar1.Go();
rDoSomething();
r>
rprogressBar1.Stop();
rprogressBar1.Style = ProgressBarStyle.Blocks;
rWhat's the right answer for Go() and Stop()?
r>
rThanks,
r>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 5 '06 #3
Hello randy1200,

AFAIK, standard progress bar doesn't support this functional
User 3rd party components or reailize it by your own

rI'm REALLY looking for how to start and stop a progress bar with the
rstyle set to marque or continuous mode. I'm asking because I can't
rfind this information in the msdn. A quick description, or a pointer
rto an msdn page that contains this information would be really
rhelpful.
r>
rThanks,
r>
r"Michael Nemtsev" wrote:
r>
>Hello randy1200,

Use cyclic-type progress bars, only indicating that work is in
progress

rI've been sucessful in using the Progress bar when I can calculate
rthe percent complete. Now I want to use it when I have no way to
rcalculate the amount of time to completion. Basically, I want to
do
rthe following:
r>
rprogressBar1.Style = ProgressBarStyle.Continuous;
rprogressBar1.Go();
rDoSomething();
r>
rprogressBar1.Stop();
rprogressBar1.Style = ProgressBarStyle.Blocks;
rWhat's the right answer for Go() and Stop()?
r>
rThanks,
r>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 5 '06 #4
Just set bar style back to block from marque to stop it. Then set value to
0 or 100 to either clear bar or fill it.

--
William Stacey [MVP]

"randy1200" <ra*******@newsgroups.nospamwrote in message
news:84**********************************@microsof t.com...
| I'm REALLY looking for how to start and stop a progress bar with the style
| set to marque or continuous mode. I'm asking because I can't find this
| information in the msdn. A quick description, or a pointer to an msdn page
| that contains this information would be really helpful.
|
| Thanks,
| --
| Randy
|
|
| "Michael Nemtsev" wrote:
|
| Hello randy1200,
| >
| Use cyclic-type progress bars, only indicating that work is in progress
| >
| rI've been sucessful in using the Progress bar when I can calculate
| rthe percent complete. Now I want to use it when I have no way to
| rcalculate the amount of time to completion. Basically, I want to do
| rthe following:
| r>
| rprogressBar1.Style = ProgressBarStyle.Continuous;
| rprogressBar1.Go();
| rDoSomething();
| r>
| rprogressBar1.Stop();
| rprogressBar1.Style = ProgressBarStyle.Blocks;
| rWhat's the right answer for Go() and Stop()?
| r>
| rThanks,
| r>
| ---
| WBR,
| Michael Nemtsev :: blog: http://spaces.msn.com/laflour
| >
| "At times one remains faithful to a cause only because its opponents do
not
| cease to be insipid." (c) Friedrich Nietzsche
| >
| >
| >
Sep 5 '06 #5
If the progressbar control doesn't support starting and stopping, then what's
the point of the marque or continuous styles? What you're saying is that I
have to start another thread for the sole purpose of spinning the progress
bar.

private void backgroundWorker1_ProgressChanged(object sender,
ProgressChangedEventArgs e)
{
this.progressBar1.Value = e.ProgressPercentage;
}

That makes absolutely no sense.

Anyone else care to comment?
--
Randy
"Michael Nemtsev" wrote:
Hello randy1200,

AFAIK, standard progress bar doesn't support this functional
User 3rd party components or reailize it by your own

rI'm REALLY looking for how to start and stop a progress bar with the
rstyle set to marque or continuous mode. I'm asking because I can't
rfind this information in the msdn. A quick description, or a pointer
rto an msdn page that contains this information would be really
rhelpful.
r>
rThanks,
r>
r"Michael Nemtsev" wrote:
r>
Hello randy1200,

Use cyclic-type progress bars, only indicating that work is in
progress

rI've been sucessful in using the Progress bar when I can calculate
rthe percent complete. Now I want to use it when I have no way to
rcalculate the amount of time to completion. Basically, I want to
do
rthe following:
r>
rprogressBar1.Style = ProgressBarStyle.Continuous;
rprogressBar1.Go();
rDoSomething();
r>
rprogressBar1.Stop();
rprogressBar1.Style = ProgressBarStyle.Blocks;
rWhat's the right answer for Go() and Stop()?
r>
rThanks,
r>
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour
"At times one remains faithful to a cause only because its opponents
do not cease to be insipid." (c) Friedrich Nietzsche
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Sep 5 '06 #6
Now I get it. Here's what worked for me, in case anyone wants to look at this
for reference:

progressBar1.Style = ProgressBarStyle.Marquee;
backgroundWorker1.RunWorkerAsync();
//Start the DoSomething() routine from within the background worker
//thread's DoWork(). That way, the UI thread isn't locked up waiting for
//DoSomething() to return, and you can see the progress bar spin.

To finish up:

private void backgroundWorker1_RunWorkerCompleted(object sender,
RunWorkerCompletedEventArgs e)
{
progressBar1.Style = ProgressBarStyle.Blocks;
progressBar1.Value = 100;
}

I suspect this is vastly superior to spining the progress bar myself in
terms of effeciency.

Many thanks,
--
Randy
"William Stacey [MVP]" wrote:
Just set bar style back to block from marque to stop it. Then set value to
0 or 100 to either clear bar or fill it.

--
William Stacey [MVP]

"randy1200" <ra*******@newsgroups.nospamwrote in message
news:84**********************************@microsof t.com...
| I'm REALLY looking for how to start and stop a progress bar with the style
| set to marque or continuous mode. I'm asking because I can't find this
| information in the msdn. A quick description, or a pointer to an msdn page
| that contains this information would be really helpful.
|
| Thanks,
| --
| Randy
|
|
| "Michael Nemtsev" wrote:
|
| Hello randy1200,
| >
| Use cyclic-type progress bars, only indicating that work is in progress
| >
| rI've been sucessful in using the Progress bar when I can calculate
| rthe percent complete. Now I want to use it when I have no way to
| rcalculate the amount of time to completion. Basically, I want to do
| rthe following:
| r>
| rprogressBar1.Style = ProgressBarStyle.Continuous;
| rprogressBar1.Go();
| rDoSomething();
| r>
| rprogressBar1.Stop();
| rprogressBar1.Style = ProgressBarStyle.Blocks;
| rWhat's the right answer for Go() and Stop()?
| r>
| rThanks,
| r>
| ---
| WBR,
| Michael Nemtsev :: blog: http://spaces.msn.com/laflour
| >
| "At times one remains faithful to a cause only because its opponents do
not
| cease to be insipid." (c) Friedrich Nietzsche
| >
| >
| >
Sep 5 '06 #7

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

Similar topics

1
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
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...
8
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....
1
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...
3
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...
1
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...
2
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...
1
by: omsai | last post by:
i am adding the button in marque Q)i want to stop the marque when mouse on button ? in asp
4
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 ...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.