/// <summary> /// 闪烁指定窗口。 /// </summary> /// <param name="hWnd">指定窗口句柄。</param> /// <param name="count">闪烁次数。</param> /// <returns>返回闪烁前窗口是否已被激活。</returns> public static bool FlashWindow(IntPtr hWnd, int count) { NativeMethods.FLASHWINFO fwi = new NativeMethods.FLASHWINFO(); fwi.cbSize = Marshal.SizeOf(fwi); fwi.hwnd = hWnd; fwi.dwFlags = NativeMethods.FLASHW_TRAY; fwi.uCount = count; fwi.dwTimeout = 0; return(UnsafeNativeMethods.FlashWindowEx(ref fwi)); }