PrintPreviewDialog problem

J

Jack E. Hardie

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
 
H

Herfried K. Wagner [MVP]

Hello,

Jack E. Hardie said:
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/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top