[DUG] Windows 7 Delphi 2007
John Bird
johnkbird at paradise.net.nz
Thu May 27 21:54:52 NZST 2010
The following code which worked in XP/Vista no longer works in Windows 7 -
it changes the application icon in the taskbar to show the state of
processing - in this case recording or pausing of automatic time recording.
Anyone have ideas on how to do this especially so it will work in all
versions of windows?
Snippets of code to show how I was using it - loading 2 icons from a
resource file.
MinIcon : array[0..1] of TIcon;
//load icons
MinIcon[0]:=TIcon.Create;
MinIcon[1]:=TIcon.Create;
MinIcon[0].Handle:=LoadIcon(hInstance,'OWLWK');
MinIcon[1].Handle:=LoadIcon(hInstance,'OWLSL');
(code snippets from a couple of functions)
//pause
ATNowRecording:=false;
Application.Icon:=MinIcon[1];
lblNowStatus.caption:='||';
lblNowStatus.Font.Color:=$00F8FFF; //orange
//start recording
ATNowRecording:=true;
Application.Icon:=MinIcon[0];
lblNowStatus.caption:='R';
lblNowStatus.Font.Color:=clMaroon;
John
More information about the Delphi
mailing list