如何设置打印机的横向或竖向打印?(50分)

X

xinmin

Unregistered / Unconfirmed
GUEST, unregistred user!
关于打印机如何设置自定义页面尺寸,已有专家作了回答。
可我要设置横向或竖向打印,该如何做?
 
printer 变量有下面设置属性
property Orientation: TPrinterOrientation;


type TPrinterOrientation = (poPortrait, poLandscape);

poPortrait : 竖
poLandscape : 横


 
procedure TForm1.Button1Click(Sender: TObject);

begin

Printer.begin
Doc;
Printer.Canvas.TextOut(100,100,'Hi there');
Printer.EndDoc;
end;


procedure TForm1.PortraitClick(Sender: TObject);

begin

Printer.Orientation := poPortrait;
end;


procedure TForm1.LandscapeClick(Sender: TObject);

begin

Printer.Orientation := poLandscape;
end;
 
接受两人的答案。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
I
回复
0
查看
917
import
I
D
回复
0
查看
1K
DelphiTeacher的专栏
D
顶部