473,795 Members | 3,215 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PrintPreviewDia log problem

When I call the PrintPreviewDia log, 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 PrintPreviewDia log 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.EventArg s) Handles btnPrintPreview .Click
Dim ppd As New PrintPreviewDia log
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, _
MessageBoxButto ns.OK, MessageBoxIcon. Error)
End Try
End Sub

Thanks, Jack Hardie
Nov 20 '05 #1
1 4416
Hello,

"Jack E. Hardie" <ha****@HeaterD esign.com> schrieb:
When I call the PrintPreviewDia log, 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 'PrintPreviewDi alog', 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
14452
by: Michael A. Covington | last post by:
By default, my PrintPreviewDialog is coming out too small. What is the best way to control its size and position? Ideally, I'd just like to maximize it. Thanks!
3
22980
by: sachin | last post by:
How to customize PrintPreviewDialog, such that, addition of a new button, change the functionality of existing button should be possible programatically. Sample code will help a lot. Moreover, what happens before the document gets displayed in PrintPreviewDialog, i.e. whether entire document gets copied in printer driver spool or only 1 or 2 pages? please guide regards
0
1597
by: Harry J. Smith | last post by:
I am using the PrintPreviewDialog Window Form from the Toolbox. It displays my RichTextBox contents correctly, but when I click on the Print icon on this form it prints one blank page and no text. How can I fix this to print the text that is being displayed? Here is the code I use to bring up the form: string stringText = helpTextOut.Text;
1
2929
by: gabriel | last post by:
Hi all, I've got a problem with a PrintPreviewDialog. It shows my document correctly but when I try to print I only get the last page. Now when I use the print function of my document directly it print's correctly. I've overriden the OnPrintPage function of PrintDocument and for as far as I can see I've correctly set he HasMorePages property. Does anyone have an idea on how to fix this, or what I'm forgetting.
4
3158
by: Kwok | last post by:
Hi, I want to print some record(s) from dataset.table(tbname) using PrintPreviewDailog and PrintDocument. But It has a infinity loop error. I use a class to control the print procedure. Here is my code.
0
1229
by: Jack E. Hardie | last post by:
I am using the PrintPreviewDialog to view my document prior to printing. When I scroll down the page, all is fine, but when I use scroll bar to go back up the page, the printed data is messed up, missing pieces, etc. Is there a way to force a refresh after scrolling using the standard PrintPreviewDialog? Thanks, Jack Hardie
1
1702
by: jacopomeucci | last post by:
hi all. I've a problem with PrintPreviewDialog in c#. I've done a form with a ListViewControl and i tried to print the data contents in this listview. I've read the ListViewControl via a WHILE cicle and i've done document then i've send it to the PrintPreviewDialog...end it seems to be perfect but when i click the printer button on the PrintPreviewDialog
2
9876
by: Richard MSL | last post by:
I am using PrintPreviewDialog to preview a file. There is a button that the user can press, which seems to print the file to the default printer. I would like to capture a click on that button so that I can present a PrintDialog, print some files in a special way, etc. But there does not seem to be an event among the PrintPreviewDialog members to do this? Or perhaps I missed it? I would appreciate any suggestions. Thanks.
0
1890
by: ppeterkin | last post by:
I customized a PrintPreviewDialog by adding a button to it's toolstrip that opens up a PageSetupDialog. The problem is changes made to the page setup are not passed to the PrintPreviewDialog until I close and reload it. How do I enable these changes to immediately show up in the print preview. See Code Below. Paul Private Sub ToolStripMenuItem2_Click(ByVal sender As System.Object,
0
9672
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7541
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3727
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2920
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.