1. Home
  2. Computing & Technology
  3. Delphi Programming

Window flashing

By , About.com Guide

Flashing a window means changing the appearance of its caption bar as if the window were changing from inactive to active status, or vice versa.

Typically, a window is flashed to inform the user that the window requires attention but that it does not currently have the keyboard focus.

The FlashWindow API function flashes the window only once.

To create a flashing window add a TTimer component on a form, and use the following code in the OnTimer event handler:

~~~~~~~~~~~~~~~~~~~~~~~~~
procedure TForm1.Timer1Timer(Sender: TObject) ;
begin
   FlashWindow (Handle, True) ;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» Open & Close CD-drive from code
« Date/Time and other International settings

Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 1999 Delphi Tips
  7. Window flashing

©2009 About.com, a part of The New York Times Company.

All rights reserved.