zoukankan      html  css  js  c++  java
  • WIN7下使用DotNetBar,关闭Aero效果,使用Office2007Form皮肤

    在窗体属性中有个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();
            }

        }

     问题解决。

  • 相关阅读:
    node连接mysql数据库
    mysql重置密码
    CSS vertical-align 属性
    JS中常用的字符串方法
    JS中的常用数组方法
    获取下拉菜单中具有SELECTED属性元素的序号和值的方法
    基本的正则表达式符号
    让多个文本输入框左侧对齐方法
    CSS选择器权重对比
    让内联元素支持宽高的几个设置
  • 原文地址:https://www.cnblogs.com/teyond/p/2486455.html
Copyright © 2011-2022 走看看