Example #1
0
        private static bool StopFlashingWindow(IntPtr hWnd)
        {
            if (IntPtr.Zero != hWnd)
            {
                var fi = new NativeMethods.FLASHWINFO();
                fi.cbSize  = (uint)Marshal.SizeOf(typeof(NativeMethods.FLASHWINFO));
                fi.dwFlags = (uint)NativeMethods.FlashWindowFlags.FLASHW_STOP;
                fi.hwnd    = hWnd;

                return(NativeMethods.FlashWindowEx(ref fi));
            }
            return(false);
        }
Example #2
0
        private static bool FlashWindow(
            IntPtr hWnd,
            NativeMethods.FlashWindowFlags fOptions,
            uint FlashCount,
            uint FlashRate)
        {
            if (IntPtr.Zero != hWnd)
            {
                var fi = new NativeMethods.FLASHWINFO();
                fi.cbSize    = (uint)Marshal.SizeOf(typeof(NativeMethods.FLASHWINFO));
                fi.dwFlags   = fOptions;
                fi.uCount    = FlashCount;
                fi.dwTimeout = FlashRate;
                fi.hwnd      = hWnd;

                return(NativeMethods.FlashWindowEx(ref fi));
            }
            return(false);
        }