Windows Form Visual Style under Windows 8

I have an application for windows forms and I call Application.EnableVisualStyles () in Main () and under windows 7,

The 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 visual style of the application under windows 8 look like the one under windows 7?

Thanks in advance.

+1
source share
1 answer

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

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

Note. You will see the old school of Windows 2000, if you do this, and not Windows 7. But you will get the same everywhere.

0
source

Source: https://habr.com/ru/post/1204358/


All Articles