Ejemplo n.º 1
0
        /// <summary>
        /// Applies glass to the current window, API was for Vista, but should work for Win 7 upwards
        /// </summary>
        /// <remarks>
        /// This appears to only "Blurs" normal controls, not the ones being themed by Krypton
        /// </remarks>
        public static void ApplyGlass(this Form window, bool apply)
        {
            PI.DWM_BLURBEHIND blurBehindParameters = new PI.DWM_BLURBEHIND(apply)
            {
                dwFlags  = PI.DWM_BB.Enable,
                hRgnBlur = IntPtr.Zero
            };

            PI.DwmEnableBlurBehindWindow(window.Handle, ref blurBehindParameters);
        }