这样应该可以:
procedure TForm1.Button1Click(Sender: TObject);
procedure PrintWithDll(cust1: String; cust2: String; code: String; code_name: String; lines: String);
begin
//
end;
begin
PrintWithDll(...);
end;
procedure TForm1.Button1Click(Sender: TObject);
procedure PrintWithDll(cust1: String; cust2: String; code: String; code_name: String; lines: String);
begin
//
end;
begin
PrintWithDll(...);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
If ... Then
ShowMessage(...);
PrintWithDll(...);
end;