示例#1
0
 protected override void OnPaintBackground(PaintEventArgs e)
 {
     base.OnPaintBackground(e);
     if (AeroHelper.DwmIsCompositionEnabled())
     {
         e.Graphics.Clear(Color.Black);
     }
 }
示例#2
0
 private void FrmSkGl_Load(object sender, System.EventArgs e)
 {
     if (AeroHelper.DwmIsCompositionEnabled())
     {
         var margins = AeroHelper.NewMargins((Width + Height) * 2);
         AeroHelper.DwmExtendFrameIntoClientArea(Handle, ref margins);
     }
 }
 private void FrmNoneBorderMove_Load(object sender, EventArgs e)
 {
     if (AeroHelper.DwmIsCompositionEnabled())
     {
         var hind = new DWM_BLURBEHIND
         {
             dwFlags = DWM_BLURBEHIND_Mask.DWM_BB_ENABLE | DWM_BLURBEHIND_Mask.DWM_BB_BLURREGION | DWM_BLURBEHIND_Mask.DWM_BB_TRANSITIONONMAXIMIZED,
             fEnable = true,
             TransitionOnMaximized = true,
         };
         DwmEnableBlurBehindWindow(Handle, hind);
     }
 }
示例#4
0
        private async void Form1_Load(object sender, EventArgs e)
        {
            if (AeroHelper.DwmIsCompositionEnabled())
            {
                var margins = AeroHelper.NewMargins((Width + Height) * 2);
                AeroHelper.DwmExtendFrameIntoClientArea(Handle, ref margins);
            }
            IsAnimation = true;
            await LoadWebImage();

            LoadResourceImage();
            await AnimationLoop();
        }
示例#5
0
 public FrmOpenCv()
 {
     InitializeComponent();
     if (AeroHelper.DwmIsCompositionEnabled())
     {
         var hind = new DWM_BLURBEHIND
         {
             dwFlags = DWM_BLURBEHIND_Mask.DWM_BB_ENABLE | DWM_BLURBEHIND_Mask.DWM_BB_BLURREGION | DWM_BLURBEHIND_Mask.DWM_BB_TRANSITIONONMAXIMIZED,
             fEnable = true,
             TransitionOnMaximized = true,
         };
         DwmEnableBlurBehindWindow(Handle, hind);
     }
 }