procedure showPrint(str: string);
var
sl: TStringList;
k: Integer;
begin
if not Assigned(PrintForm) then
PrintForm := TPrintForm.Create(Application.MainForm);
with PrintForm do
begin
sl := TStringList.Create;
try
sl.Text := str;
with listview1.Items.Add do
begin
Caption := '等待';
imageindex := 0;
for k := 0 to sl.Count - 1 do
SubItems.Add(sl.Strings[k]);
end;
if spPrintShowModal then
ShowModal
else
begin
if not Visible then Visible := True;
BringToFront;
end;
finally
sl.Free;
end;
end;
end;