Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. [DllImport("user32.dll")]
  2. static extern Int32 FlashWindowEx(ref FLASHWINFO pwfi);
  3.  
  4. [StructLayout(LayoutKind.Sequential)]
  5. public struct FLASHWINFO
  6. {
  7.     public UInt32 cbSize;
  8.     public IntPtr hwnd;
  9.     public Int32 dwFlags;
  10.     public UInt32 uCount;
  11.     public Int32 dwTimeout;
  12. }
  13.  
  14. public static void Flash()
  15. {
  16.     FLASHWINFO fw = new FLASHWINFO();
  17.  
  18.     fw.cbSize = Convert.ToUInt32(Marshal.SizeOf(typeof(FLASHWINFO)));
  19.     fw.hwnd = Process.GetCurrentProcess().MainWindowHandle;
  20.     fw.dwFlags = 2;
  21.     fw.uCount = 5;
  22.  
  23.     FlashWindowEx(ref fw);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement