Esempio n. 1
0
 private void SetCompositionState()
 {
     if (QTUtility.IsVista)
     {
         if ((0 <= PInvoke.DwmIsCompositionEnabled(out this.fCompositionEnabled)) && this.fCompositionEnabled)
         {
             QTTabBarLib.Interop.MARGINS pMarInset = new QTTabBarLib.Interop.MARGINS();
             pMarInset.cxLeftWidth = -1;
             if (0 <= PInvoke.DwmExtendFrameIntoClientArea(base.Handle, ref pMarInset))
             {
                 base.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
                 this.BackColor = Color.Black;
                 return;
             }
         }
         this.BackColor = SystemColors.Menu;
     }
     else
     {
         base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
     }
     base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
 }
Esempio n. 2
0
 public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMarInset);
Esempio n. 3
0
 private void SetCompositionState()
 {
     if(!QTUtility.IsXP) {
         if((0 <= PInvoke.DwmIsCompositionEnabled(out fCompositionEnabled)) && fCompositionEnabled) {
             MARGINS pMarInset = new MARGINS();
             pMarInset.cxLeftWidth = -1;
             if(0 <= PInvoke.DwmExtendFrameIntoClientArea(Handle, ref pMarInset)) {
                 SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
                 BackColor = Color.Black;
                 return;
             }
         }
         BackColor = SystemColors.Menu;
     }
     else {
         FormBorderStyle = FormBorderStyle.FixedToolWindow;
     }
     SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
 }
Esempio n. 4
0
 private void SetCompositionState() {
     if(QTUtility.IsVista) {
         if((0 <= PInvoke.DwmIsCompositionEnabled(out this.fCompositionEnabled)) && this.fCompositionEnabled) {
             QTTabBarLib.Interop.MARGINS pMarInset = new QTTabBarLib.Interop.MARGINS();
             pMarInset.cxLeftWidth = -1;
             if(0 <= PInvoke.DwmExtendFrameIntoClientArea(base.Handle, ref pMarInset)) {
                 base.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
                 this.BackColor = Color.Black;
                 return;
             }
         }
         this.BackColor = SystemColors.Menu;
     }
     else {
         base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
     }
     base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
 }
Esempio n. 5
0
 public static extern int DwmExtendFrameIntoClientArea(IntPtr hWnd, ref MARGINS pMarInset);