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;
}
//Hört auf zu blinken. Das System stellt den ursprünglichen Zustand des Fensters wieder her.
public const UInt32 FLASHW_STOP = 0;
//Fensterbeschriftung blinken lassen.
public const UInt32 FLASHW_CAPTION = 1;
//Flashen Sie die Taskleistenschaltfläche.
public const UInt32 FLASHW_TRAY = 2;
//Flashen Sie sowohl die Fensterbeschriftung als auch die Taskleistenschaltfläche.
//Dies entspricht dem Festlegen von FLASHW_CAPTION | FLASHW_TRAY-Flags.
public const UInt32 FLASHW_ALL = 3;
//Kontinuierliches Blinken, bis das Flag FLASHW_STOP gesetzt ist.
public const UInt32 FLASHW_TIMER = 4;
//Kontinuierliches Blinken, bis das Fenster in den Vordergrund tritt.
public const UInt32 FLASHW_TIMERNOFG = 12;
网(www.php.cn)!