古月一刀 发表于 2015-5-16 12:32:49

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

  在窗体属性中有个EnableGlass属性,设置为False即可。
  eg:
  //使用API
namespace WindowsFormsApplication1
{
    static class Program
    {
      
      private extern staticuint Win32DwmEnableComposition(uint uCompositionAction);
  ///
      /// 应用程序的主入口点。
      ///
      
      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();
      }
  }
  问题解决。
页: [1]
查看完整版本: WIN7下使用DotNetBar,关闭Aero效果,使用Office2007Form皮肤