Как получить разрешение принтера по умолчанию

Советы » Принтеры и Печать » Как получить разрешение принтера по умолчанию

uses

Printers; function

GetPixelsPerInchX: Integer; begin

Result := GetDeviceCaps(Printer.Handle, LOGPIXELSX) end

; function

GetPixelsPerInchY: Integer; begin

Result := GetDeviceCaps(Printer.Handle, LOGPIXELSY) end

; procedure

TForm1.Button1Click(Sender: TObject); begin

Caption := Format('x: %d y: %d DPI (dots per inch)', [GetPixelsPerInchX, GetPixelsPerInchY]); end

;

Другое по теме:

Категории

Статьи

Советы

Copyright © 2023 - All Rights Reserved - www.delphirus.com