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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using PrintDialog(), can I specify "Preview"? 1

Status
Not open for further replies.

furjaw

Programmer
Mar 27, 2006
49
0
0
US
This will give me a print preview:
Dim dlg As New PrintPreviewDialog()
dlg.Document = PrintDocument1
dlg.ShowDialog()

This will let me select a printer:
Dim dlg As New PrintDialog()
dlg.Document = PrintDocument1
If dlg.ShowDialog = DialogResult.OK Then
PrintDocument1.Print()
End If

But, how do I do both?
 
By placing the code to open up the Print Preview in the If statement checking for an OK result from the PrintDialog.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top