procedure ShowProgress(Aowner:TComponent;const Title: string);
var
i: Integer;
begin
if not Assigned(ProgressForm) then
ProgressForm := TProgressForm.Create(Aowner)
else
ProgressForm.BringToFront;
if Title<>'' then
ProgressForm.lblTitle.Caption := Title;
ProgressForm.Show;
//这里不用那个循环
WindowList:=DisableTaskWindows(ProgressForm.Handle);
ProgressForm.Update;
end;
procedure HideProgress;
var
i: Integer;
begin
if not Assigned(ProgressForm) then Exit;
//关闭改为这样
EnableTaskWindows(WindowList);
ProgressForm.Close;
Application.ProcessMessages;
ProgressForm.Free;
ProgressForm := nil;
end;Author:
Passion Time: 2008-3-8 10:09