打印条形码 [英] print BARCODE

查看:122
本文介绍了打印条形码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个用VB6编写的现有项目,现在我需要在其上进行条形码打印.我已经为它编写了代码,并且当打印机连接到我的开发机器上的串行端口时,它可以正常工作.

问题在于客户端计算机中没有串行端口,而只有USB端口.当我通过USB端口连接打印机时,没有任何反应.我想对代码进行任何更改以使其实现吗?

I am working on an existing project which is written on VB6 and now I need to encoorporate barcode printing on it. I have written the code for it and it is working well and fine when the printer is connected to serial port on my development machine.

The problem is that in the clients machine doesnot have serial port but is having only a USB port. When I connected the printer through USB port nothing is happening. Am I suppose to make any changes on my code to make it happen?

推荐答案

1)在Windows中安装打印机. [您需要为两个LPT广告USB安装驱动程序]
2)关闭所有程序
3)点击开始"
4)选择设置",然后选择打印机和传真"
现在应该列出所有打印机.
5)用鼠标右键"单击您的打印机名称.
6)从弹出菜单中选择属性"
7)单击顶部的端口"选项卡
8)写下您的USB端口名称的名称(以防万一)
9)单击启用打印机池"复选框
注意:这应该在该框中打勾.
10)现在在所有列出的端口中向上或向下滚动
并单击"LPT1"端口以在其中打勾.
注意:您现在应该已选择2个端口-USB和LPT1
11)单击高级"选项卡.
12)单击打印处理器."按钮.
13)从默认数据类型:"列表中选择文本".
14)点击确定"
15)单击应用"和确定".
16)重新启动程序,然后尝试打印.

您与此处的vb代码无关.应该可以.

希望对您有帮助
1) Install the printer in windows. [You need to install drivers for both LPT ad USB]
2) Close all programs
3) Click on "Start"
4) Choose "Settings" then "Printers and Faxes"
All of your printers should now be listed.
5) Do a "right mouse" click on your printers name.
6) Choose "Properties" from the popup menu
7) Click on the "Ports" tab at the top
8) Write down the name of your USB port name (just incase)
9) Click on the "Enable Printer Pooling" checkbox
Note: This should put a checkmark in that box.
10) Now scroll up or down through all of your listed ports
and click on the "LPT1" port to place a checkmark in it.
Note: You should now have 2 ports selected - USB & LPT1
11) Click on "Advanced" tab.
12) Click on "Print Processor.." button.
13) Select "TEXT" from "Default datatype:" list.
14) Click "OK"
15) Click on "Apply" and "Ok".
16) Restart your program and try printing.

You have nothig to do with your vb code here. It should work.

Hope it helps you


1)使用免费的条形码字体,例如"9之3".

2)搜索Codeproject.这个问题以前已经问过很多遍了.

3)获取所需条形码类型的规格并自己绘制条形码.

4)最重要的是:了解如何使用Google!
1) Use a free barcode font, e.g. "3 of 9".

2) Search Codeproject. This question has been asked many times before.

3) Get the specifications for the desired barcode-type and do the barcode drawing yourself.

4) And most important: Learn how to use google!


这个问题尚不清楚.您是否有打印机连接到USB?是否安装了条形码字体?为什么使用VB6,几年前它已被VB.NET取代.
This question is not clear. Do you have a printer connected to the USB? Do you have barcode fonts installed? Why are you using VB6, it was replaced by VB.NET years ago.


这篇关于打印条形码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆