-
Sep 25th, 2013, 09:30 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Select the printer from the PrintPreviewDialog
When I print a document the user first has to select the printer, I have used the code shown.
<code>
If PrintDialog1.ShowDialog = DialogResult.OK Then
PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
PrintDocument1.DefaultPageSettings.Landscape = True
Call PrintDocument1.Print()
End If
</code>
To do the PrintPreview I use the folowing code:
<code>
PrintDocument1.DefaultPageSettings.Landscape = True
PrintPreviewDialog1.WindowState = FormWindowState.Normal
PrintPreviewDialog1.StartPosition = FormStartPosition.CenterScreen
PrintPreviewDialog1.ClientSize = New Size(800, 600)
PrintPreviewDialog1.ShowIcon = False
PrintPreviewDialog1.Document = PrintDocument1
PrintPreviewDialog1.ShowDialog()
</code>
If the user descides to print from the print preview, the document is printed to the default printer, the user cannot select the printer.
How do I modify my code so the user can select the printer from PrintPreview?
In Windows Explorer the from the Print Preview the user has to slect the printer and in MicrosoftWord there in the PrintPreview there is option to select the printer.
-
Sep 25th, 2013, 10:35 AM
#2
Thread Starter
Hyperactive Member
Re: Select the printer from the PrintPreviewDialog
I found a good solution - it's at the bottom of this post.
It's all a matter of know what to look for.
http://social.msdn.microsoft.com/For...lect-a-printer
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|