コード例 #1
0
ファイル: DWMManager.cs プロジェクト: wsrf2009/KnxUiEditor
        /// <summary>Disables the Aero "Blur Behind" effect.</summary>
        public static void DisableBlurBehind(IntPtr hWnd)
        {
            if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled)
                return;

            NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind();
            bb.dwFlags = NativeMethods.BlurBehindFlags.Enable;
            bb.fEnable = false;

            NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb);
        }
コード例 #2
0
ファイル: DWMManager.cs プロジェクト: wsrf2009/KnxUiEditor
        /// <summary>Enable the Aero "Blur Behind" effect on a specific region. Background of the region must be black.</summary>
        public static void EnableBlurBehind(IntPtr hWnd, IntPtr regionHandle)
        {
            if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled)
                return;

            NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind();
            bb.dwFlags = NativeMethods.BlurBehindFlags.Enable | NativeMethods.BlurBehindFlags.BlurRegion;
            bb.fEnable = true;
            bb.hRgnBlur = regionHandle;

            NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb);
        }
コード例 #3
0
        /// <summary>Disables the Aero "Blur Behind" effect.</summary>
        public static void DisableBlurBehind(IntPtr hWnd)
        {
            if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled)
            {
                return;
            }

            NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind();
            bb.dwFlags = NativeMethods.BlurBehindFlags.Enable;
            bb.fEnable = false;

            NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb);
        }
コード例 #4
0
        /// <summary>Enable the Aero "Blur Behind" effect on a specific region. Background of the region must be black.</summary>
        public static void EnableBlurBehind(IntPtr hWnd, IntPtr regionHandle)
        {
            if (!OsSupport.IsVistaOrBetter || !OsSupport.IsCompositionEnabled)
            {
                return;
            }

            NativeMethods.BlurBehind bb = new NativeMethods.BlurBehind();
            bb.dwFlags  = NativeMethods.BlurBehindFlags.Enable | NativeMethods.BlurBehindFlags.BlurRegion;
            bb.fEnable  = true;
            bb.hRgnBlur = regionHandle;

            NativeMethods.DwmEnableBlurBehindWindow(hWnd, ref bb);
        }