当前位置:网站首页>14x1.5cm竖向标签有点难,VFP调用BarTender来打印
14x1.5cm竖向标签有点难,VFP调用BarTender来打印
2022-06-30 05:10:00 【加菲猫的VFP】
测试环境说明:
WIDNOWS 10 64bit PRO(低版本无法安装BarTender2022)
打印机 佳博GP-1324D
VFP9 SP2 7423
这个软件用来打标签是真不错,很好上手。
通过新建文档向导来新建14cmx1.5cm的竖向标签

选择对应的标签打印机
设置单列还是多列等相关设置







创建具名数据源




绑定具名数据源
选中文本或是标签二维码,右击-》选择属性
选中数据源页签,点击手势图标进行选择
这里有更改数据源名称向导,可以在列表内选择对应的数据源
设置完成后关闭
按照如上图操作,把所有需要变量的文本或二码码全部指定具名数据源.
将制作好的标签存在自己需要调用的位置。
然后就可以透过VFP程式打印标签了,下面是代码:
&& TMP301是临时表
&& 创建BarTender的对象
XX=CREATEOBJECT("BarTender.Application")
&& 打开标签,返回标签对象
PrintLab=XX.FORMATS.OPEN(MCPATH_FRM + 'MC43011.BTW',.T.,"")
&& 参数1:具名数据源名称(注意区分大小),参数2:值PrintLab.SetNamedSubStringValue("fastnomsg",TMP301.FASTNOMSG)
PrintLab.SetNamedSubStringValue("partnomsg",TMP301.PARTNOMSG)
PrintLab.SetNamedSubStringValue("partspecmsg",TMP301.PARTSPECMSG)
PrintLab.SetNamedSubStringValue("partnamemsg",TMP301.PARTNAMEMSG)
PrintLab.SetNamedSubStringValue("qrcorerpt",TMP301.PARTNOMSG)
&& 输出到打印机,参数2:.F.=不显示选择打印机的窗口。传递的参数不要搞错不然会死机
PrintLab.Printout(.T.,.F.)
测试完成,打印完美!!!
2022-06-24 SUN 于苏北淮安
边栏推荐
- JPA复合主键使用
- The difference between SVG and canvas
- Unity dotween plug-in description
- GoLand No Tests Were Run : 不能使用 fmt.Printf() <BUG>
- Tensorflow2 of ubantu18.04 X installation
- redis集群概念
- GoLand No Tests Were Run : 不能使用 fmt.Printf() <BUG>
- Initial environment configuration of the list of OpenGL super classic (version 7) vs2019
- How to install win7 on AMD Ruilong CPU A320 series motherboard
- Unity2019.3.8f1 development environment configuration of hololens2
猜你喜欢

Virtual and pure virtual destructions

UE4 method of embedding web pages

Unity2019.3.8f1 development environment configuration of hololens2

Some books you should not miss when you are new to the workplace

Database base (Study & review for self use)

Force buckle 977 Square of ordered array

Unity Logitech steering wheel access

Network communication problem locating steps

虚析构和纯虚析构

Exploration of unity webgl
随机推荐
力扣27. 移除元素
Unity + hololens publishing settings
Leetcode 180 Consecutive numbers (2022.06.29)
Unity automatic pathfinding
Rotation, translation and scaling of unity VR objects
Steamvr causes abnormal scene camera
Postman 做测试的 6 个常见问题
Unity2019.3.8f1 development environment configuration of hololens2
Pytorch的安装以及入门使用
Create transfer generation point
Unity dotween plug-in description
Deeply understand the function calling process of C language
Singleton mode in unity
Force buckle 59 Spiral matrix II
Unity lens making
Revit二次開發---未打開項目使用面板功能
Unity3d packaging and publishing APK process
Unity call Exe program
Display steerable 3D model in front of unity UI
How to install win7 on AMD Ruilong CPU A320 series motherboard