I want to show realtime process status on form caption when the form is minimized on taskbar.
When the form state is wsnormal, it shows. When the form is minimized, I want also to show the status on form.caption.
procedure Tform1.Button1Click(Sender: TObject);
var
i:integer;
begin
form1.WindowState:=wsminimized;
for i:=0 to 10000 do //10000 files
begin
//process files
form1.caption:=inttostr(i)+'/'+inttostr(10000); //not showing
application.processmessage;
end;
end;
When process is done and form state is wsnormal, form1.caption shows the state ‘10000/10000’.
I am using delphi 7.0
Thank you in advance.
When the form is minimized, you can’t see its title bar, and so there is no point in updating it, is it? Perhaps you are talking about the caption shown in the taskbar in old versions of Microsoft Windows (and with non-default settings in new versions)? You can set this using
Application.Title. Or are you taking about the the Aero Peek feature? There you can in fact see the form’s title, and it updates as normal even when the form is minimized.