L
liudangdang
Unregistered / Unconfirmed
GUEST, unregistred user!
请问该怎样做才能改变打印机的纸张大小、方向等值,我用
pDMode := GlobalLock(hDMode);
if pDMode <> nil then
begin
pDMode^.dmOrientation := 2;
pDmode^.dmFields := pDMode^.dmFields or DM_ORIENTATION;
ResetDC(Printer.Handle,pDMode^);
GlobalUnlock(hDMode);
end;
with Printerdo
begin
begin
Doc;
Canvas.TextOut(10,10,'Hello, My Friend!');
EndDoc;
end;
在本程序中测试打印效果时是正确的,可用这个打印机打其它的文档时,又改回默认值了,请问各位高手该如何做,才可以使打印机设置在其它页面也生效呢?
pDMode := GlobalLock(hDMode);
if pDMode <> nil then
begin
pDMode^.dmOrientation := 2;
pDmode^.dmFields := pDMode^.dmFields or DM_ORIENTATION;
ResetDC(Printer.Handle,pDMode^);
GlobalUnlock(hDMode);
end;
with Printerdo
begin
begin
Doc;
Canvas.TextOut(10,10,'Hello, My Friend!');
EndDoc;
end;
在本程序中测试打印效果时是正确的,可用这个打印机打其它的文档时,又改回默认值了,请问各位高手该如何做,才可以使打印机设置在其它页面也生效呢?