can't print a form in landscape

binodbdrchand

New member
Joined
Sep 8, 2008
Messages
4
Programming Experience
Beginner
I'm trying to print a form in landscape with the ability for the user to choose a printer. Code follows:

'The Main Form (mForm) has a lot of labes and textboxes.
'pDocument is the PrinterDocument whose Document property is set to the 'mForm
'pDialog is the PrinterDialog whose Document property is set to pDocument

If pDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
pDialog.Document.Print()
End If
'After the print dialog is shown, Landscape is selected and Print command 'given but the Potrait is printed

'I've also tried this but to no avail

pDocument.DefaultPageSettings.Landscape = True
pDocument.Print()

Your help is much appreciated.
 
Back
Top