求助超市电脑小票打印实施!!问题圆满解决满分相送!!! 超市一般用票据打印机,直接用OUTPUT输出打印即可。速度很快 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 难道用print不能解决么,好象+个什么参数表示输出到打印机的,很久没用过了,但有点印象,然后再用tab还是local几乎都能打印出来吧 printer用这个完全可以控制的因为它的位置是相对固定的只不过每次打的数据不同但是一点不太好控制,就是商品数量的问题如果你用其它的控件,也是可以做的比方说,ACTIVEREPORT,专门打印的控件,非常好用 直接写到文本文件,传到打印机dos 命令Type a.txt>printNAME open "Lpt1" for output As #1 print #1,string("=",128)'打多少个自己调,大致就是这样 for i=0 to rst.count-1 ................. nextclose #1这种打印对于连续POS打印机是打多少就滚多少 我用的是EPSON 的TM-U220票据打印机,If MSComm1.PortOpen = False Then MSComm1.commPort = 2 MSComm1.PortOpen = TrueEnd IfMSComm1.Output = Trim(yzName) & "加油收款凭证" + Chr(13) + Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = "加油时间: " & Format(cc_Date, "yyyy-mm-dd") & " " & Trim(cc_Time) & Chr(13) & Chr(10)MSComm1.Output = "机 号: " & Mid(jyRs.JiHao, 1, 2) & " 油 品: " & Trim(jyRs.YouPin) & Chr(13) & Chr(10)MSComm1.Output = "升 数: " & Format(Val(cc_Qty), "####.00") & " " & "金 额: " & Format(cc_Amount, "####.00") & Chr(13) & Chr(10)MSComm1.Output = "卡 号: " & Right("000000" & cc_CardNo, 6) & Chr(13) & Chr(10)MSComm1.Output = "卡 余 额: " & Format(Val(cc_Card_Amount), "####.00") & Chr(13) & Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = Chr(13) + Chr(10)MSComm1.Output = Chr(29) + "V" + Chr(1) + Chr(13) + Chr(10) ' 切纸你自己仿以上方式就可以了,很简单的。 TO:TheRule(绝非偶然) 我的VB程序是运行在联想之类的XP系统品牌机器上的,怎么也有问题吗? 我有做过这样的案例,而且一直也用的挺好。我是用 ActiveReport 来设计的,蛮好用的 TO: saiko(小新) 能提供示例研究一下? 关于vfw捕获视频 转网页设计了,今天的成果,大家给捧捧场啊! combo中显示唯一字段问题 Windows的记事本 VB中的打印问题,高分求解 VB怎样向某个窗口中的按键发送点击消息 急聘 问个操作系统的问题 谁能帮帮我。。。。help!!!!! formula one6.0 如何支持ADO,我怎么搞不定? SQL语句 请问在VB中如何清除掉DBF数据库中的记录?(急,在线等)
因为它的位置是相对固定的
只不过每次打的数据不同
但是一点不太好控制,就是商品数量的问题
如果你用其它的控件,也是可以做的
比方说,ACTIVEREPORT,专门打印的控件,非常好用
dos 命令
Type a.txt>printNAME
print #1,string("=",128)'打多少个自己调,大致就是这样
for i=0 to rst.count-1
.................
next
close #1这种打印对于连续POS打印机是打多少就滚多少
MSComm1.commPort = 2
MSComm1.PortOpen = True
End If
MSComm1.Output = Trim(yzName) & "加油收款凭证" + Chr(13) + Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = "加油时间: " & Format(cc_Date, "yyyy-mm-dd") & " " & Trim(cc_Time) & Chr(13) & Chr(10)
MSComm1.Output = "机 号: " & Mid(jyRs.JiHao, 1, 2) & " 油 品: " & Trim(jyRs.YouPin) & Chr(13) & Chr(10)
MSComm1.Output = "升 数: " & Format(Val(cc_Qty), "####.00") & " " & "金 额: " & Format(cc_Amount, "####.00") & Chr(13) & Chr(10)
MSComm1.Output = "卡 号: " & Right("000000" & cc_CardNo, 6) & Chr(13) & Chr(10)
MSComm1.Output = "卡 余 额: " & Format(Val(cc_Card_Amount), "####.00") & Chr(13) & Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = Chr(13) + Chr(10)
MSComm1.Output = Chr(29) + "V" + Chr(1) + Chr(13) + Chr(10) ' 切纸你自己仿以上方式就可以了,很简单的。
我的VB程序是运行在联想之类的XP系统品牌机器上的,怎么也有问题吗?
我是用 ActiveReport 来设计的,蛮好用的
能提供示例研究一下?