|
|
导航: |
论坛 -> DELPHI技术
斑竹:liumazi,sephil |
|
作者: |
|
2017/4/19 15:13:29 |
标题: |
Delphi7+Codesoft6标签指定打印机打印问题 |
浏览:1238 |
|
加入我的收藏 |
楼主: |
请问如果一台电脑有多台条码打印机,要根据设定好的模板指定特定不同打印机来打印(非系统默认打印机)的话,要如何写? 另外Delphi里面引用Lppx2.tlb有点问题,谢谢! 哪位高人有Codesoft的开发说明文档,可否提供,谢啦! PrinterName:=cbb2.Text;
BarApp := CreateOleObject('lppx.Application'); BarApp.Visible:=False;
BarDoc:=BarApp.ActiveDocument; BarDoc.Open(ExtractFilePath(paramstr(0))+'Box1.Lab');
BarDoc.Variables.Item('SHF').Value:=edt1.Text; BarDoc.Variables.Item('FHF').Value:=edt2.Text; BarDoc.Variables.Item('SCRQ').Value:=DateTimeToStr(dtpscrq.Date); BarDoc.Variables.Item('BZTM').Value:=edt3.Text;
//BarDoc.Printer.SwitchTo(); //printer.getprinter(mdevice, mdriver, mport, mhdmode); //printer.setprinter(cbb2.Text, mdriver, mport, mhdmode);
Bardoc.Printlabel(strtoint(edt4.Text)); BarDoc.FormFeed; Bardoc.Close; BarApp.Quit;
----------------------------------------------
- |
作者: |
|
2017/4/21 12:52:03 |
1楼: |
BarDoc.Printer 提示没有这个
----------------------------------------------
-
|
作者: |
|
2017/4/21 21:41:19 |
2楼: |
我们都是直接用ShellExecute打开Codesoft生成的文件的,之后就会自动打开Codesoft软件,用他的打印
----------------------------------------------
-
|
作者: |
ujjldn (ujjldn) |
★☆☆☆☆ |
-
|
盒子活跃会员 |
|
2017/4/21 22:08:24 |
3楼: |
fastreport这种报表控件 做条码标签打印及指定打印机很方便啊
----------------------------------------------
-
|
|