protected override void OnPaintBackground(PaintEventArgs e) { base.OnPaintBackground(e); if (AeroHelper.DwmIsCompositionEnabled()) { e.Graphics.Clear(Color.Black); } }
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); } }
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(); }
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); } }