⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 printsetup.~pas

📁 档案信息管理系统
💻 ~PAS
字号:
//打印设置
unit PrintSetup;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TPrintSetupForm = class(TForm)
    Label1: TLabel;
    edTitle: TEdit;
    FontDialog: TFontDialog;
    btTitleFont: TBitBtn;
    Label2: TLabel;
    btContent: TBitBtn;
    PrintPreview: TBitBtn;
    procedure PrintPreviewClick(Sender: TObject);
    procedure btTitleFontClick(Sender: TObject);
    procedure btContentClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    TitleFont : TFont;
    ContentFont :TFont;
    PrintTitle : String;
  end;

var
  PrintSetupForm: TPrintSetupForm;

implementation
uses PrintMain,ArchMain, printMemo;

{$R *.dfm}

procedure TPrintSetupForm.PrintPreviewClick(Sender: TObject);
begin

    PrintTitle :='';//保存打印的标题信息
    PrintTitle :=edTitle.Text;

/////////////////////////////////////////////////////////
//判断是打印查询的多条记录,还是打印单条记录的详细信息
/////////////////////////////////////////////////////////

    if StuffMain.PageControl1.ActivePageIndex <>1 then
    begin
       PrintMemoForm :=TPrintMemoForm.Create(Application);
       PrintMemoForm.Show;
       printMemoForm.Close;
    end
    else
    begin
       PrintMainForm :=TPrintMainForm.Create(Application);
       PrintMainForm.Show;
       PrintMainForm.close;
    end;
    PrintSetupForm.Close;
end;

procedure TPrintSetupForm.btTitleFontClick(Sender: TObject);
begin
//设置标题的字体

    if FontDialog.Execute then
         TitleFont :=fontDialog.Font;
end;

procedure TPrintSetupForm.btContentClick(Sender: TObject);
begin
//设置正文的字体
    if FontDialog.Execute then
         ContentFont :=fontDialog.Font;
end;

procedure TPrintSetupForm.FormShow(Sender: TObject);
begin
//创建字体类型变量,并为它们赋初值
      TitleFont :=TFont.Create;
      ContentFont :=TFont.Create;
      TitleFont :=PrintSetupForm.Font;
      ContentFont :=PrintSetupForm.Font;

end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -