Printer.print对象vb6

时间:2014-01-01 23:39:46

标签: vb.net printing

我开发了打印收据的应用程序,用vb6打印机类打印使用visualbasic powerpack库,这对于这样的任务非常方便。但是,我有一个问题,打印对话框在收据打印时弹出,暂停我的应用程序显示时间。 这是代码和图片

Private Sub SetPrinterName(ByVal PrinterName As String, ByVal AppPath As String)
    Dim prnPrinter As Printer

    For Each prnPrinter In Printers
        If prnPrinter.DeviceName = PrinterName Then
            p = prnPrinter
            Exit For
        End If
    Next
    p.DocumentName = "ERP System"
    Me.Path = AppPath
    p.PrintAction = Printing.PrintAction.PrintToPrinter
    p.CurrentX = 0
    p.CurrentY = 10
    p.Print("Receipt")
    p.EndDoc
End Sub

small dialog

0 个答案:

没有答案