Desktop Functions: Smart Device Functions:
|
C# Signature:
[DllImport("user32.dll")] User-Defined Types:[StructLayout(LayoutKind.Sequential)] public struct FLASHWINFO {
public UInt16 cbSize; } Notes://Stop flashing. The system restores the window to its 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 is 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; Tips & Tricks:Please add some! Sample Code:/// <summary> /// Flashes a window /// </summary> /// <param name="hWnd">The handle to the window to flash</param> /// <returns>whether or not the window needed flashing</returns> public static bool FlashWindowEx(IntPtr hWnd) {
FLASHWINFO fInfo = new FLASHWINFO(); } ... if (!FlashWindowEx(someForm.Handle)) {
//The window was already active } Alternative Managed API:Do you know one? Please contribute it! Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).
|
|