472,126 Members | 1,447 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,126 software developers and data experts.

PrintPreviewDialog problem

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
1 4307
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.

Similar topics

2 posts views Thread by Michael A. Covington | last post: by
reply views Thread by Harry J. Smith | last post: by
1 post views Thread by gabriel | last post: by
reply views Thread by Jack E. Hardie | last post: by
1 post views Thread by jacopomeucci | last post: by
2 posts views Thread by Richard MSL | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.