VB 调用打印机,直接打印内容
vb6 连接两个打印机,一个是斑马888 TT 另一个是KP600,KP600为默认打印机,
该问题与KP600无关,即斑马888TT 在未设置默认打印机的情况下,VB6后台调用
输出字符串"123ABC测试"即可,就大神解答
[解决办法]
枚举并选择指定的打印机:
' Return True if there is a problem.
Private Function SelectPrinter(ByVal printer_name As String) As Boolean
Dim i As Integer
SelectPrinter = True
For i = 0 To Printers.Count - 1
If Printers(i).DeviceName = printer_name Then
Set Printer = Printers(i)
SelectPrinter = False
Exit For
End If
Next i
End Function