我需要在vb里打印(一串数字) 我希望在我指定的位置打印他们 如何设置打印位置? 速回 谢谢
展开全部
使用打印自定义函数实现定位打印:
Option Explicit
Dim X As Long
Dim Y As Long
Dim fnt As Long
Dim txt As Variant
Dim dd As Variant
Public Function prnt(X As Variant, Y As Variant, fnt As Variant, txt As Variant)
Printer.CurrentX = X
Printer.CurrentY = Y
Printer.FontSize = fnt
Printer.Print txt
End Function
Private Sub Command1_Click()
Y = 450: X = 3500
txt = "执行工艺号日期 "
fnt = 16
dd = prnt(X, Y, fnt, txt)
Y = 750:
X = 500
txt = "记录号"
dd = prnt(X, Y, fnt, txt)
X = 2400
txt = "干箱温度"
dd = prnt(X, Y, fnt, txt)
Printer.EndDoc
End Sub
来自:求助得到的回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询