--> Default Printer Name Reading the default printer. | Delphi Tips Trick

For Newbie

Tuesday, 15 November 2011

Default Printer Name Reading the default printer.

| Tuesday, 15 November 2011


Function declaration:
PrinterDef function: string;
var
   sStr: array [0 .. 255] of Char;
begin
   GetProfileString ('Windows', 'device','', sStr, 255);
   Result: = StrPas (sStr);
end;

Example of implementation:
procedure TForm1.Button1Click (Sender: TObject);
begin
   Edit1.Text: = PrinterDef;
end;



default printer name delphi

Related Posts

No comments: