PRivate void Flashit ()
{
Flashwinfo fi = new Flashwinfo ();
Fi.cbsize = (UINT) System.Runtime.InteropServices.Marshal.SizeOf (FI);
Fi.hwnd = Handle;
Fi.dwflags = Flashw_tray;
Fi.ucount = 3;
fi.dwtimeout = 0;
FlashWindowEx (ref FI);
}
[DllImport ("User32.dll")]
[Return:marshalas (Unmanagedtype.bool)]
static extern bool FlashWindowEx (ref flashwinfo PWFI);
[StructLayout (LayoutKind.Sequential)]
public struct Flashwinfo
{
Public UInt32 cbsize;
Public INTPTR hwnd;
Public UInt32 dwFlags;
Public UInt32 Ucount;
Public UInt32 dwtimeout;
}
Stop flashing. The system restores the window to their original state.
Public Const UInt32 Flashw_stop = 0;
Flash the window caption.
Public Const UInt32 Flashw_caption = 1;
Flash the taskbar button.
Public Const UInt32 Flashw_tray = 2;
Flash both the window caption and taskbar button.
This was equivalent to setting the Flashw_caption | Flashw_tray flags.
Public Const UInt32 Flashw_all = 3;
Flash continuously, until the FLASHW_STOP flag is set.
Public Const UINT32 Flashw_timer = 4;
Flash continuously until the window comes to the foreground.
Public Const UInt32 FLASHW_TIMERNOFG = 12;
The above is the C # implementation of the task bar flashing content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!