How do we set landscape mode in the PrintPreview control?

Gruff

Newcomer
Joined
Dec 14, 2006
Location
Scappoose, OR, USA
Seems Like I haven't been on this site in quite a while.
I am using VB 2010 full version.

As the title says. I having problems getting print preview to display the proper view in landscape mode. It stubbornly shows portrait.

I am using the PrintPreview control in the hopes I can change printer setup information on the fly while in preview mode.

Before I call a dialog containing the printpreview control I am setting PrintDocument.PrintSettings.DefaultPageSettings.Landscape = True

Thus far I have less hair and no answers.
 

Gruff

Newcomer
Joined
Dec 14, 2006
Location
Scappoose, OR, USA
Discovered one way to programmically change the settings without using the dialogs

1) Initialize a PageSetupDialog object.
2) Set the Document property to your PrintDocument.
3) Set PageSetup Properties as desired. (PaperSize, Margins, Landscape, Etc..)
4) Do Not use the ShowDialog Method.
5) Launch the PrintPreview Control.

I imagine I can do the same with the PrintDialog for its properties.

Silly but it works.
 
Top Bottom