By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,890 Members | 1,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,890 IT Pros & Developers. It's quick & easy.

PrintPreviewDialog problem

P: n/a
When I call the PrintPreviewDialog, the resulting default window and zoom
size are too small to read. I have figured out how to resize the window,
but can someone help me with the call to preset the zoom to 100% instead of
the default Auto?
My code is as follows:
' The PrintPreviewDialog is associated with the PrintDocument as the
preview is
' rendered, the PrintPage event is triggered. This event is passed a
graphics
' context where it "draws" the page.
Private Sub btnPrintPreview_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles btnPrintPreview.Click
Dim ppd As New PrintPreviewDialog
Try
'Size the Window for the Print Preview to 800 x 550
ppd.ClientSize = New System.Drawing.Size(800, 550)
ppd.Document = pdoc
ppd.ShowDialog()
Catch exp As Exception
MessageBox.Show("An error occurred while trying to load the " &
_
"document for Print Preview. Make sure you currently have "
& _
"access to a printer. A printer must be connected and " & _
"accessible for Print Preview to work.", Me.Text, _
MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub

Thanks, Jack Hardie
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello,

"Jack E. Hardie" <ha****@HeaterDesign.com> schrieb:
When I call the PrintPreviewDialog, the resulting default window
and zoom size are too small to read. I have figured out how
to resize the window, but can someone help me with the call
to preset the zoom to 100% instead of the default Auto?


Maybe this can be done by inheriting from 'PrintPreviewDialog', a basic
sample:

http://www.mvps.org/dotnet/dotnet/samples/printing/

--
Herfried K. Wagner
MVP VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.