How to get default system style on C# progressbar
In Windows Vista & 7 progressbars are green and have a glassy finish. But the one served up by Visual Studio 2010 has the system default of blue highlight (which appears flat and looks a bit Windows 98).
How do I get that glassy green look (or whatever the user's theme default is)?
(Using C# v4.0 if that makes a difference)
EDIT: Ok - just noticed how square the buttons look on this and other dialogs' controls - I think somehow the entire app is being styled 开发者_如何学Cpre win XP? Can someone tell me how to set the style correctly for the whole app (i.e. to match the current OS)?
Add this line in your Program.cs
:
static void Main()
{
Application.EnableVisualStyles();
精彩评论