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 |
No comments:
Post a Comment