How to set a default paper size "Legal" [RESOLVED]

gsxawd99

Member
Joined
Sep 10, 2005
Messages
8
Programming Experience
Beginner
Is there any way i can set the default paper size to legal instead of the standard letter? Right now, I have to go through the screens of the print dialog to select legal every time and it's annoying, I'm sure there's a way to do this and it's proabably so simple....also how do you make the print dialog appear centered in the screen when it's called(right now it appears in the upper left corner of the screen). Any idea how to make a PrintPreviewDialog screen to be maximized when it loads? Any help would be appreciated..
 
Last edited:
Try this:

VB.NET:
[color=blue]For[/color] i = 0 To pp.PageSettings.PrinterSettings.PaperSizes.Count - 1
 
[color=blue]If [/color]pp.PageSettings.PrinterSettings.PaperSizes.Item(i).Kind = paperkind.legal [color=blue]Then[/color]
[color=#0000ff][/color] 
pp.PageSettings.PaperSize = pp.PageSettings.PrinterSettings.PaperSizes.Item(i)
 
[color=blue]Exit For[/color]
[color=#0000ff][/color] 
[color=blue]End If[/color]
[color=#0000ff][/color] 
[color=blue]Next
[/color]

HTH
Regards ;)
 
Where am i supposed to use this code? What is this for? I tried plugging it in concerning the Print Dialog control and also the print document control but neither worked. It does not offer a pagesettings foe either...am i supposed to be using a page setup dialog also?? Right now, all i have is a print dialog and a print document, I'm just trying to get the print dialog to automatically be set on "legal" so the user doesn't have to change this everytime they print..
 
Never mind, i figured out where to place the code and how to use it, it works great Thanks a lot for your help, couldn't have done it w/o you...
 
Back
Top