📄 得到不可打印区域.txt
字号:
var
pntMargins : TPoint;
begin
{ @ means " the address of the variable" }
Escape(Printer.Handle, GETPRINTINGOFFSET,0,nil,@prntMargins);
end;
Getting the Right and Bottom Margins aren't quite so straightforward. There isn't an equivalent Escape call. You obtain these values by getting the physical width
(physWidth) and height (physHeight) of the page, the printable width (PrintWidth) and height (PrintHeight) of the page, and then carrying out the following sums:
RightMargin := physWidth - PrintWidth - LeftMargin
BottomMargin := physHeight - PrintHeight - TopMargin
The physical page size is found using Escape, this time with the GETPHYSPAGESIZE parameter. The point pntPageSize contains the page width in pntPageSize.x
and page height in pntPageSize.y
var
pntPageSize : TPoint;
begin
Escape(Printer.Handle, GETPHYSPAGESIZE,o,nil,@pntPageSize);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -