Private Sub Command1_Click()
Dim i As Integer
Open "LPT1" For Output As #1
Print #1, Chr(27)Chr(64) '清除原先的打印设置,即初始化
Print #1, Chr(28) &"@" '设置汉字状态
pnt1
Print #1, Chr(28) &"J" '设置汉字纵向打印
pnt1
Print #1, Chr(28) &"K" '设置汉字横向打印状态
Print #1, Chr(27)"3"Chr(45) '设置换行量宽度
Print #1, Chr(27)"W"Chr(1) '设置四倍放大
Print #1, Chr(27)"q"Chr(3) '设置空心字
pnt1
Print #1, Chr(27)Chr(64) '清除原先的打印设置,即初始化
For i = 3 To 24 Step 3 '执行字符间隔调整
Print #1, Chr(28)"S"Chr(0)Chr(i)
pnt1
Next
Print #1, Chr(28)"S"Chr(0)Chr(3)
Print #1, Chr(27)"4"'设置斜体
Print #1, Chr(27)"q"Chr(3) '设置空心字
pnt1
'Print #1, Chr(28) &"." '切换回西文状态
Close #1
End Sub
Private Sub Form_Load()
Text1 = ""
Open "LPT1" For Output As #1
Print #1, Chr(27)Chr(64) '清除原先的打印设置,即初始化
Close
End Sub
Public Sub pnt1()
Print #1, , "LPT1:" &"带有心脏的中英文打印机"
End Sub
也可搜索下,用API来执行打印.
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)