473,573 Members | 2,719 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 4401
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
14294
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
22932
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...
0
1578
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 =...
1
2912
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...
4
3143
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
1200
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
1684
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...
2
9845
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...
0
1882
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...
0
7705
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8033
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5601
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...
0
3734
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3739
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2224
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
1
1316
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1044
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...

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.