views:

79

answers:

3

Does anyone know what my progress bar looks different in the Visual Studio designer than it does when i build and run my project?

In the designer i see the newer style. Progress is indicated with a solid green line with smoothed edges.

When I run my project the progress bar looks like the old style one. It has ten separate divisions that are blue rectangles.

Why the difference?

+1  A: 

Progress bars can have several different styles (as you have seen). While the designer should reflect the current style of the bar, it's possible it is simply showing a default style, while the progress bar is actually set to a different style.

You can change the ProgressBar.Style property on the progress bar to control this. You can set it to: Blocks, Continuous or Marquee - see here for the valid values and descriptions.

xan
A: 

Is it running on a different PC, if so what you are seeing is the difference in windows themes.

If it is on the same machine it is not a behaviour I would have expected to see.

JTew
+1  A: 

Make sure EnableVisualStyles is called before your form is loaded. This is usually in the program class before Application.Run.

Application.EnableVisualStyles();
Jared
Also, make sure the ProgressBar.Style is set to "System" in order to use the systems visual style. This is the default.
Jared
Application.EnableVisualStyles() fixed it! Thanks!
Jordan S