Windows Form Visual Style under Windows 8

900 views Asked by At

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.

1

There are 1 answers

0
Jon Watte On

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.