为什么我的形式看起来像“Windows经典”? [英] Why do my forms look like 'Windows Classic'?

查看:146
本文介绍了为什么我的形式看起来像“Windows经典”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有免费的工具,风格我的C#Windows窗体,使它们看起来像Windows 7的Windows。

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

**编辑**

在设计模式,我有这样的:

In the designer mode, I have this :

但是,当我跑我得到这样的:

But when I run I get this :

我不知道为什么,我明白了。 (老款)

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

感谢

推荐答案

您应该启用视觉样式

看<一href="http://msdn.microsoft.com/en-us/library/system.windows.forms.application.enablevisualstyles.aspx">Application.EnableVisualStyles方法

在创建任何控件之前调用此方法

Call this method before creating any controls

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

这篇关于为什么我的形式看起来像“Windows经典”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆