quinta-feira, 11 de setembro de 2008

Saber qual a impressora padrão do Windows

//Declare a unit Printers na clausula uses

function CorrentPrinter :String;
var
Device : array[0..255] of char;
Driver : array[0..255] of char;
Port : array[0..255] of char;
hDMode : THandle;
begin
Printer.GetPrinter(Device, Driver, Port, hDMode);
Result := Device+' na porta '+Port;
end;


Nenhum comentário: