您的位置:首页 > 其它

WIN7下使用DotNetBar,关闭Aero效果,使用Office2007Form皮肤

2012-05-06 19:15 197 查看
在窗体属性中有个EnableGlass属性,设置为False即可。

eg:

//使用API
namespace WindowsFormsApplication1
{
static class Program
{
[DllImport("dwmapi.dll", EntryPoint = "DwmEnableComposition")]
private extern static uint Win32DwmEnableComposition(uint uCompositionAction);

/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
try
{
Win32DwmEnableComposition(0); // 关闭aero效果
}
catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.StackTrace+":"+ex.Message ); }
finally
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
     }
}
}
}

public partial class Form1 : Office2007Form
{

public Form1()
{
InitializeComponent();
}

}

问题解决。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: