[DUG] Windows 7 Delphi 2007
John Bird
johnkbird at paradise.net.nz
Fri May 28 11:17:34 NZST 2010
Bingo - that was it - it needs administrative access and icon change works
fine. (The user I am logged in does already have administrator level - so
I hadn't thought of this yet), but I need to run the program as
administrator to have control over the task bar it looks.
Now - why did it used to work OK on Vista??? Any ideas? - will have to
scratch my head on that.
John
--------------------------------------------------
From: "Jan Bakuwel" <jan.bakuwel at omiha.com>
Sent: Friday, May 28, 2010 10:29 AM
To: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
Subject: Re: [DUG] Windows 7 Delphi 2007
> Hi John,
>
> Wouldn't know out of the top of my head... I know it's a long shot but
> how about trying to run your app as Administrator - see if that makes a
> difference? Using D2010 on W7 here too - if you post a small example app
> - ie. stripped down to just the problem - I'll have a play with it.
>
> Jan
>
>
> On 27/05/10 21:54, John Bird wrote:
>> 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
>>
>>
>> _______________________________________________
>> NZ Borland Developers Group - Delphi mailing list
>> Post: delphi at delphi.org.nz
>> Admin: http://delphi.org.nz/mailman/listinfo/delphi
>> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
>> unsubscribe
>>
>>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject:
> unsubscribe
More information about the Delphi
mailing list