Why do my forms look like 'Windows Classic'?

▼魔方 西西 提交于 2019-12-12 07:25:08

问题


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 :

But when I run I get this :

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

Thanks


回答1:


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());
}


来源:https://stackoverflow.com/questions/6466282/why-do-my-forms-look-like-windows-classic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!