title: System.Drawing.Printing.PrintDocument without popup printing page 1 of document
body: <p>we have a windows form application trying to do regular printouts.</p>
  
  <p>Clients are complaining with popup coming up while we do multiple print outs saying printing page 1 of document. ( i guess im  not allowed to post pictures, i dont have the reputation, so here is the <a href="http://i.stack.imgur.com/TYbvl.png" rel="nofollow">screenshot</a>)</p>
  
  <p>Is there a way to hide these. or should  we be using a different method. Thank you.</p>
  
  <pre><code>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
  </code></pre>