大疆phantom说明书:delphi中怎么样用Delphi控制Windows的默认打印机。
来源:百度文库 编辑:偶看新闻 时间:2024/04/30 01:22:28
1:设置默认打印机。
procedure TForm1.FormCreate(Sender: TObject);
begin
cb1.items.assign(printer.printers);
end;
procedure TForm1.Button1Click(Sender: TObject);
var LPrinter:string;
PrinIniFile:Tinifile;
LStr:string;
begin
LStr:=printer.Printers[cb1.itemindex];
delete(Lstr,pos(' on ',Lstr),Length(LStr));
PrinIniFile:=TIniFile.Create('WIN.ini');
try
LPrinter:=PrinIniFile.ReadString('Devices',LStr,'');
PrinIniFile.writestring('windows','device',LStr ',' LPrinter);
finally
PrinIniFile.free;
end;
end;
2:你可以用Printer.PrinterIndex来控制打印机。首先,你取得所有的打印机,找出哪台是
激光打印机,哪台是针式打印机,然后,根据各PrinterIndex不同,在打印时自己作出选择
就可以用不同的打印机打不同的内容了。也不用改系统的默认打印机。
3:多人接受答案了。
Delphi中:
远程控制Delphi源代码
delphi 鼠标控制问题?
怎么样在delphi中实现托盘图标??
Delphi中如何调用DLL中的窗体以及用DLL中的窗体控制主窗体
delphi 中 $这个符号干嘛用的?
请问delphi中ADO组件怎么用?
delphi中如何调用
delphi中实现动画
delphi 中 Idhttp 使用
DELPHI中ODBC介绍
DELPHI中RECV是什么意思
Delphi 中SQL语句
delphi中打开word
谁知道怎么用Delphi控制输入法的开启关闭
怎么样用DELPHI在一个数字文档中每隔四个数字加一个逗号
Delphi怎么样成exe文件?
Delphi怎么样成exe文件?
Delphi用不了
delphi有什么用
谁会用delphi
用DELPHI的请进?
请教个delphi中问题
delphi中goto的用法