E
Emmanuel
Hi,
the PrintDialog does not return the correct value for the Orientation of
the page if it is first initialized to false.
The following code demonstrates the problem:
PrintDialog pdlg = new PrintDialog();
pdlg.PrinterSettings = new System.Drawing.Printing.PrinterSettings();
// If this line is omitted everything works fine.
pdlg.PrinterSettings.DefaultPageSettings.Landscape = false;
if( pdlg.ShowDialog() == DialogResult.OK )
MessageBox.Show("Landscape is " +
pdlg.PrinterSettings.DefaultPageSettings.Landscape.ToString(),
"Info",
MessageBoxButtons.OK,
MessageBoxIcon.Information );
If the initialization of the orientation is omitted the PrintDialog works
fine returning the correct value for the orientation.
Is this a bug or am I doing something wrong ?
I want to be able to setup the default settings in the dialog (Printer
properties), show the dialog and then get the values chosen by the user.
Thanks
Emmanuel
the PrintDialog does not return the correct value for the Orientation of
the page if it is first initialized to false.
The following code demonstrates the problem:
PrintDialog pdlg = new PrintDialog();
pdlg.PrinterSettings = new System.Drawing.Printing.PrinterSettings();
// If this line is omitted everything works fine.
pdlg.PrinterSettings.DefaultPageSettings.Landscape = false;
if( pdlg.ShowDialog() == DialogResult.OK )
MessageBox.Show("Landscape is " +
pdlg.PrinterSettings.DefaultPageSettings.Landscape.ToString(),
"Info",
MessageBoxButtons.OK,
MessageBoxIcon.Information );
If the initialization of the orientation is omitted the PrintDialog works
fine returning the correct value for the orientation.
Is this a bug or am I doing something wrong ?
I want to be able to setup the default settings in the dialog (Printer
properties), show the dialog and then get the values chosen by the user.
Thanks
Emmanuel