文档详情

C#使用BarTender条码标签打印处理的例子.docx

发布:2017-06-08约字共2页下载文档
文本预览下载声明
C# 使用BarTender条码标签打印处理的例子就是和那个GettingStartedwithActiveXAutomationUsingCsharp的白皮书里面说的一样先引用一个BarTender的 Com.然后就是BarTender.ApplicationbtApp;BarTender.FormatbtFormat;private void Form1_Load(object sender, EventArgs e){btApp = new BarTender.Application();}private void Form1_FormClosed(object sender, FormClosedEventArgs e){btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);}private void button2_Click(object sender, EventArgs e){btFormat = btApp.Formats.Open(@e:\Test.btw, false, ); // 同样标签的份数 // 也就是一个标签,打印多少份 // 系统默认是 1 // 当1个标签,需要打印多份的时候,修改这个参数 // 例如:需要打印某种无序号物品的标签 // 需要打印 20个物品的标签。 // 这20个标签的号码,都是一样的。btFormat.PrintSetup.IdenticalCopiesOfLabel = 1; // 序列标签数 // 当这个数字大于1的时候,会额外的打其他的标签。 // 例如下面的 ZB1000 // 当序列标签数 = 4 的时候。(好像系统默认是 4) // 会打印出 // ZB1000 // ZB1000 // ZB1000 // ZB1000 // 4张标签。btFormat.PrintSetup.NumberSerializedLabels = 1;btFormat.SetNamedSubStringValue(Name, 测试 V1.0);btFormat.SetNamedSubStringValue(Code, ZB1000;btFormat.PrintOut(false, false);btFormat.SetNamedSubStringValue(Name, 测试 V2.0);btFormat.SetNamedSubStringValue(Code, ZB1000;btFormat.PrintOut(false, false);}主要是在C# 程序中,需要正确的填写btFormat.PrintSetup.IdenticalCopiesOfLabel与btFormat.PrintSetup.NumberSerializedLabels的数值。
显示全部
相似文档