Why do my forms look like 'Windows Classic'?

Wassim AZIRAR picture Wassim AZIRAR · Jun 24, 2011 · Viewed 8.7k times · Source

Is there any free tool to style my C# Windows Forms, to make them look like Windows 7 Windows.

**EDIT**

In the designer mode, I have this :

enter image description here

But when I run I get this :

enter image description here

I don't know why I get that. (Old style)

Thanks

Answer

Navid Rahmani picture Navid Rahmani · Jun 24, 2011

You should enable visual styles

look Application.EnableVisualStyles Method

Call this method before creating any controls

[STAThread]
static void Main() 
{
    Application.EnableVisualStyles();
    Application.Run(new YourMainForm());
}