Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Taskbar buttons remain after app is closed?

Status
Not open for further replies.

ors

Programmer
Sep 10, 2005
18
MT
Closing screensaver application (written in Delphi 5) leaves icon on taskbar?? Clicking on it makes it disappear. If the screensaver is activated a number of times, these application buttons on the taskbar accumulate. Still, they disappear once you click on them.

Problem observed in both Win98 and XP.

This is the code I run prior to closing the application

MediaPlayer1.Close;
MediaPlayer1.Free;
Images.Free;
if ThisIsNotAnNTMachine then
SystemParametersInfo(SPI_SCREENSAVERRUNNING, Word(False), @OldValue,0)
else
SystemParametersInfo(SPI_SETSCREENSAVEACTIVE, 1, nil, 0); // set saver on
OkToQuit := True;
Close;

In the main form's close query I also have:
procedure TSaver.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
CanClose := OkToQuit;
end;


Any ideas?
 
I could not solve this but resorted to hiding the taskbar button altogether through APIs.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top