unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, QuickRpt, ExtCtrls, QRPrev;
type
TForm1 = class(TForm)
QuickRep1: TQuickRep;
TitleBand1: TQRBand;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
procedure FormColorControl(Sender: TObject);
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormColorControl(Sender: TObject);
var
i, mycount: integer;
begin
if Screen.ActiveForm = nil then
exit;
// QRPrev
if Screen.ActiveForm is TQRStandardPreview then
begin
with TQRStandardPreview(Screen.ActiveForm)do
begin
Caption := self.Caption + ' —— 打印预览';
ExitButton.Caption := '退出';
FirstPage.Hint := '第一页';
PreviousPage.Hint := '上一页';
ToolButton2.Hint := '下一页';
LastPage.Hint := '最后一页';
PrintSetup.Hint := '设置打印机';
Print.Hint := '打印';
SaveReport.hint := '保存报告';
LoadReport.hint := '读取报告';
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Screen.OnActiveFormChange:=FormColorControl;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
QuickRep1.Preview;
end;
end.