I guess you have to change your operating system.
From the help files:
Windows XP Home Edition, Windows XP Professional x64 Edition, Windows Server 2003 Platform Note:
Thestyle is supported only on these platforms.
I tried it on a Vista home basic and an XP Pro SP2 (Media Center Edition) and it displayed a scrolling block on both.
Look for this line:
<EnableVisualStyles>true</EnableVisualStyles>In your Application.myapp file.
So, I found a solution for this problem. When I set Windows theme to default, it's ok, marquee statusbar is working. But when I use another windows themes, progressbar is blank.
What's the differents between
and using Application.EnableVisualStyles(); ???
If you are using VB <EnableVisualStyles>true</EnableVisualStyles> should be in your Application.myapp file.
If you are using C# Application.EnableVisualStyles(); should be in your Main method. Usually in your Program.cs file.VisualStyles have to be enabled before a window is created.
It would be appreciated if you provide code that invokes ProgressBar to show. Then I can see what’s going on about your ProgressBar.
However, based on my experience, it’s probably caused by the execution of other methods, such as looping, which have blocked ProgressBar from showing successfully.
This case usually happens when you are doing some looping and you want to show progress at the same time. If your code is looping very fast, then ProgressBar’s events would not be handled, hence would not be redrawn.
If your problem is caused by what I have said, I would like to suggest you explicitly call Application.DoEvent() near your looping code segment, which can ask Framework handle Control events and redraw all controls.
Here is a code sample:Code Snippet
private void button1_Click(object sender, EventArgs e)
progressBar1.Style = ProgressBarStyle.Marquee;
progressBar1.Style = ProgressBarStyle.Blocks;
Notice: I’d like to remind you that if you call Application.DoEvent() too often, that could cause a heavy performance bottleneck, which is not a good design.
Hope this helps. If there is anything unclear, please feel free to let me know.
I didn't use marquee progressbar in loops.
The task is show marquee progressbar after clicking on the button on the form. For example:
We have new form, button and progressbar. When I click on the button, progresbar should be marquee. That's all.
But if we use another windows theme, not a microsoft's themes, but themes from different programs like WindowBlinds so marquee progressbar didn't work.
The question is how to use marquee progressbar in themes differents to standart microsoft's themes?