DELPHI How flashing application window or taskbar button

Use FlashWindowEx function:

A set FlashWInfo
Delphi TFlashWInfo stated in the following:
the Type
TFlashWInfo = Record
the cbSize: LongInt;
the hWnd: LongInt;
the dwFlags: LongInt;
uCount: LongInt;
the dwTimeout: LongInt;
End;
Example:
var
FWInfo: TFlashWInfo;
the begin
FWinfo.cbSize: = 20 is ;
FWinfo.hwnd: = Application.Handle; // flashing window handle
FWinfo.dwflags: = FLASHW_ALL;
FWinfo.ucount: = 10; // number of flashes
FWinfo.dwtimeout: = 0; // speed in milliseconds, 0 pointer defaults to the same rate of flashing
end;

dwflags indicator flashes manner:
FLASHW_STOP = 0 // stop flashing
FLASHW_CAPTION = 1 // flashing window title
FLASHW_TRAY = 2 // flashing taskbar button
FLASHW_ALL = 3 // flashing window title with the taskbar button
FLASHW_TIMER = 4 // kept flashes, until the flag is set FLASHW_STOP
FLASHW_TIMERNOFG = 5 // blink until the window is prepended

Second, the function call FlashWindowEx
FlashWindowEx (FWinfo);

Above is valid only on Windows 98 or later operating system, if you are compatible with Windows 95, you need to use FlashWindow functions, but these functions each flash only once and in line with the Timer control to blink continuously.

Guess you like

Origin www.cnblogs.com/blogpro/p/11446669.html