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?
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?