1

I have a windows form application, and I call Application.EnableVisualStyles() in the Main(), and under windows 7,

A button looks like this: enter image description here

But under Windows 8, the same button looks like this: enter image description here

Is there a way to make the application visual style under windows 8 look similar to what under windows 7?

Thanks in advance.

Qstonr
  • 815
  • 1
  • 9
  • 11
  • 1
    That's the deal you make with WinForms and VisualStyles - it uses the style of the operating system so that the end user is comfortable with a common set of controls that are used with that operating system. No work-around unless you try to draw it yourself, which is usually not recommended. – LarsTech Jan 22 '14 at 15:59
  • Thanks. Is there any thing I could do to Windows 8 to change the system style? – Qstonr Jan 23 '14 at 14:58
  • I think you are looking at 3rd party software for something like that. If the styling of buttons and controls is that important, then you would have to consider using WPF instead of WinForms. – LarsTech Jan 23 '14 at 15:50

1 Answers1

0

You can try removing the call to Application.EnableVisualStyles() at the beginning of your Main() function, to get a more consistent style across OS versions.

    [STAThread]
    static void Main() {
        //  Application.EnableVisualStyles(); <-- comment this out
        Application.SetCompatibleTextRenderingDefault(false);

Note: You will get the old-school Windows 2000 look if you do this -- not the Windows 7 look. But you'll get the same everywhere.

Jon Watte
  • 6,579
  • 4
  • 53
  • 63