procedure TForm1.Button1Click(Sender: TObject);
var
Device,
Driver,
Port : array[0..255] of char;
hDMode : THandle;
begin
Printer.GetPrinter(Device, Driver, Port, hDMode);
if hDMode <> INVALID_HANDLE_VALUE Then
showmessage('Default Printer is:' + device);
end;