Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PrintDialog (too slow)

Status
Not open for further replies.

stevejones

Programmer
Jul 3, 2002
30
GB
I have the following code

Dim frmPrint As New System.Windows.Forms.PrintDialog()
Dim objButtonPressed As System.Windows.Forms.DialogResult

With frmPrint
.AllowPrintToFile = False
.AllowSelection = False
.AllowSomePages = False
.PrinterSettings = New Drawing.Printing.PrinterSettings()
objButtonPressed = .ShowDialog()

objPrinter = .PrinterSettings
End With

When the code is run within my procedures it takes about 30 seconds for the printdialog form to display (at the showdialog line).

If I add a second .showdialog straight after it is displayed instantly. I only have three printers set up on my PC, and the printdialog is shown instantly in office products like word etc.

Am I missing something?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top