Private Function PrintReceiptFormat(ByVal printer As String) As Boolean
Dim iCtr As Integer
Try
Dim pd As New PrintDocument()
AddHandler pd.PrintPage, AddressOf Pd_PrintPage
pd.PrinterSettings.PrinterName = printer
If pd.PrinterSettings.IsValid Then
PrintReceiptFormat = True
pd.Print()
Else
PrintReceiptFormat = False
End If
Catch
PrintReceiptFormat = False
End Try
End Function
Private Sub Pd_PrintPage(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)
end sub
每次打印的时候窗体上会出现一个打印的小窗体,1秒内消失掉,请问如何能不出现这个打印窗体。
------解决思路----------------------
Printdocument隐藏"正在打印"窗口
dim PrintStandard as PrintController=new StandardPrintController()
printdocument1.PrintController=PrintStandard
printdocument1.print()