prsetting.pas

来自「是 delphi6的函数库」· PAS 代码 · 共 69 行

PAS
69
字号
unit prSetting;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, ComCtrls,   ExtCtrls,PReport, Spin;

type
  TfrmSetting = class(TForm)
    PageControl1: TPageControl;
    TabSheet1: TTabSheet;
    CancelBtn: TBitBtn;
    OKBtn: TBitBtn;
    chkAddSpace: TCheckBox;
    Label3: TLabel;
    edtDataLine: TEdit;
    Label2: TLabel;
    TopMargin: TSpinEdit;
    Label5: TLabel;
    BottomMargin: TSpinEdit;
    Label1: TLabel;
    LeftMargin: TSpinEdit;
    Label4: TLabel;
    RightMargin: TSpinEdit;
    Label6: TLabel;
    SpeedButton2: TSpeedButton;
    PrinterSetupDialog1: TPrinterSetupDialog;
    chkPrintLine: TCheckBox;
    procedure FormActivate(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    stList:Tlist;
  end;

var
  frmSetting: TfrmSetting;

implementation

uses PRDesigner;

{$R *.dfm}

procedure TfrmSetting.FormActivate(Sender: TObject);
begin
      prDeviceMode;
      with Devmode^ do //设置打印纸  
      begin
        dmFields:=dmFields or DM_PAPERSIZE;
        dmPapersize:=FprPageNo;
        dmFields:=dmFields or DM_ORIENTATION;
        dmOrientation:=FprPageXy;

        dmPaperLength:=fpaperLength;
        dmPaperWidth:=fpaperWidth;
      end;
end;

procedure TfrmSetting.SpeedButton2Click(Sender: TObject);
begin
 PrinterSetupDialog1.Execute;
end;

end.

⌨️ 快捷键说明

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