void IMainWindowService.Flash(int rpCount, int rpTimeout) { var rInfo = new NativeStructs.FLASHWINFO() { cbSize = Marshal.SizeOf(typeof(NativeStructs.FLASHWINFO)), hwnd = r_Handle, dwFlags = NativeEnums.FLASHW.FLASHW_TRAY | NativeEnums.FLASHW.FLASHW_TIMERNOFG, uCount = (uint)rpCount, dwTimeout = (uint)rpTimeout, }; NativeMethods.User32.FlashWindowEx(ref rInfo); }
void FlashWindow() { var rHandle = (IntPtr)DispatcherUtil.UIDispatcher.Invoke(new Func<IntPtr>(() => new WindowInteropHelper(App.Current.MainWindow).Handle)); var rInfo = new NativeStructs.FLASHWINFO() { cbSize = Marshal.SizeOf(typeof(NativeStructs.FLASHWINFO)), hwnd = rHandle, dwFlags = NativeEnums.FLASHW.FLASHW_TRAY | NativeEnums.FLASHW.FLASHW_TIMERNOFG, dwTimeout = 250, uCount = 5, }; NativeMethods.User32.FlashWindowEx(ref rInfo); }
void IMainWindowService.Flash(int rpCount, int rpTimeout) { var rInfo = new NativeStructs.FLASHWINFO() { cbSize = Marshal.SizeOf(typeof(NativeStructs.FLASHWINFO)), hwnd = Handle, dwFlags = NativeEnums.FLASHW.FLASHW_TRAY | NativeEnums.FLASHW.FLASHW_TIMERNOFG, uCount = rpCount, dwTimeout = rpTimeout, }; NativeMethods.User32.FlashWindowEx(ref rInfo); }
public static extern bool FlashWindowEx(ref NativeStructs.FLASHWINFO pwfi);