2

In one application I'm suddenly getting a style that looks like windows classics.

It looks good in the Visual Studio designer (left on the image) but when I run the application it looks like windows classics style (right on the image) and I can't find it.

I tried to create a new clean window and add one button to it and that also looks like windows classics.

Any ideas for how to fix it or what I can search for to find whats causing it?

alt text

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Ola
  • 629
  • 1
  • 8
  • 18
  • 1
    Do other programs on your computer (like calc) look like classic Windows theme? – tster Oct 15 '09 at 18:16
  • No. Just tried the calculator and it looks super fine! – Ola Oct 15 '09 at 18:38
  • Does this answer your question? [Why do my forms look like 'Windows Classic'?](https://stackoverflow.com/questions/6466282/why-do-my-forms-look-like-windows-classic) – devRicher Dec 29 '21 at 11:32

2 Answers2

13

You need to call Application.EnableVisualStyles (); in you Main method.

Foxfire
  • 5,675
  • 21
  • 29
1

Nice! Looks like it's supposed to now:

alt text

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Ola
  • 629
  • 1
  • 8
  • 18