For Newbie

Tuesday, 15 November 2011

Default Printer Name Reading the default printer.



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

Share on Facebook
Share on Twitter
Share on Google+

Related : Default Printer Name Reading the default printer.