2014-09-25 5 views
1

문서의 1 페이지 우리는 정규 양식 출력을 시도하는 Windows 양식 응용 프로그램을 가지고 있습니다.System.Drawing.Printing.PrintDocument (팝업 인쇄 없음)

우리는 문서의 1 페이지를 인쇄하는 중 여러 개의 인쇄 출력을하는 동안 팝업이 나타나면서 고객이 불평하고 있습니다. (사진을 게시 할 수 없다고 생각합니다. 평판이 없습니다. 여기 screenshot입니다.

숨길 수있는 방법이 있습니까? 또는 우리는 다른 방법을 사용해야 만합니다. 고맙습니다.

Function Print() 
    Dim prn As New Printing.PrintDocument 
    Using (prn) 
     prn.PrinterSettings.PrinterName = sPrnName 
     prn.PrinterSettings.Copies = 1 
     AddHandler prn.PrintPage, AddressOf Me.PrintPageHandler 
     prn.Print() 
     RemoveHandler prn.PrintPage, AddressOf Me.PrintPageHandler 
    End Using 


End Sub 



Private Sub PrintPageHandler(ByVal sender As Object, _ 
    ByVal args As Printing.PrintPageEventArgs) 
    Dim myFont As New Font("Courier New", 9) 
    args.Graphics.DrawString(_sPrnRows, _ 
     New Font(myFont, FontStyle.Bold), _ 
     Brushes.Black, 5, 5) 
End Sub 
+0

나는이 대화 상자가 표시되는 것을 방지하는 방법을 모르지만, PrintDocument의'DocumentName' 속성을 설정하면 더 의미있는 것으로 만들 수 있습니다 '. 그러면 "문서"대신 문서 이름이 표시됩니다. – jmcilhinney

+0

그들은 그것들을 지우거나 숨기는 데에 주력합니다. 응용 프로그램 화면 뒤에 표시해야합니다. – drewex

+0

http://stackoverflow.com/questions/10572420/how-to-skip-the-dialog-of-printing-in-printdocument-print-and-print-page-direc – albert

답변

1

답변은 질문에서 얻은 것입니다. prn.PrintController = new System.Drawing.Printing.StandardPrintController()

관련 문제