![]() |
Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming! |
⤷ Get name/port of current printer
Use GetPrinter procedure for getting information about current printer.Don't forget include Printers in uses chapter.
uses Printers;
...
procedure TForm1.Button1Click(Sender: TObject);
var
MyPrinter, MyDriver, MyPort: array[0..100] of Char;
DevMode: THandle;
begin
Printer.GetPrinter(MyPrinter, MyDriver, MyPort, DevMode);
Label1.Caption:=MyPrinter;
Label2.Caption:=MyPort;
end;
-
More for developers