Revolving Progress Bar during long operation...

Posted on 2006-06-07
Medium Priority
Last Modified: 2008-01-09
I'm working on a Windows Forms project written in C# (.Net 2.0 - Visual Studio 2005) and I'm stuck on what seems like it should be a trivial task.  I have a form that allows the user to select certain values and then these values are used to query a database and write the results to a CSV file.  All of the information processing takes place in a separate thread from the UI and I would like to have something that shows that the program is doing work.

What I envision is a Progress Bar marquee that just "revolves" until the processing stops.  Any kind of graphic really that just spins or rotates or whatever just so that something is graphically moving on the main form while the work is being done.  I assume that the Progress Bar control would be the easiest to implement even though I don't really want to show the "Progress" of the program, I just want something that looks pretty and lets the user know that something is still happening.

Do I need to create a separate thread that has no purpose other than to change value of the ProgessBar so that it remains animated while the Program is running?  It seems like there should be a better (easier?) way.

Thanks in advance.
Question by:naj2576
  • 2
LVL 11

Accepted Solution

vo1d earned 2000 total points
ID: 16854375
you just have to use the NEW style property of the progressbar.
use the Marquee style, thats what you need i think.
progressBar1.Style = ProgressBarStyle.Marquee;

Author Comment

ID: 16854441
Thanks for the help.  I can't believe I missed that.  I knew I was trying to make it too complicated.
LVL 11

Expert Comment

ID: 16854765
you're welcome. that is to my opinion one of the greatest control updates except for the strip things of net2.

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

864 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