--> Blinking XP Start Button Delphi | Delphi Tips Trick

For Newbie

Tuesday, 15 November 2011

Blinking XP Start Button Delphi

| Tuesday, 15 November 2011
Tricks to make animated "blink" on the start button of Windows XP via Delphi.

Add TTimer components.
   private
     cc: Byte;
     targetHwnd: hWnd;
     ...

TForm1.FormCreate procedure (Sender: TObject);
begin
   targetHwnd: = GetWindow (FindWindow ('Shell_TrayWnd', nil), GW_CHILD or GW_HWNDFIRST);
   cc: = 0;
end;

TForm1.Timer1Timer procedure (Sender: TObject);
begin
   cc: = cc + 1;
   if cc> 2 then cc: = 0;
   case cc of
   1: ShowWindow (targetHwnd, SW_SHOW);
   2: ShowWindow (targetHwnd, SW_HIDE);
   end;
end;

Related Posts

No comments: