H
Hugo M.
Hello,
I am writing a application which has a print function. Everything
works fine with the printing function, except for the fact that i
can't seem to get the printing options that I enter in the
printDialog...
private PrintDocument printDoc = new PrintDocument();
private PrintDocument printQualifier = new PrintDocument();
private PageSettings pgSettings = new PageSettings();
private System.Windows.Forms.PrintDialog dlgPrint;
[...]
private void mnuPrint_Click(object sender, System.EventArgs e)
{
printDoc.DefaultPageSettings = pgSettings;
dlgPrint.Document = printDoc;
PrinterSettings settings = new PrinterSettings();
dlgPrint.PrinterSettings = settings;
if (dlgPrint.ShowDialog() == DialogResult.OK)
{
settings = dlgPrint.PrinterSettings;
/*This is my problem. copies will not take the value I
entered in the print dialog*/
int copies = settings.Copies;
printDoc.Print();
}
}
If anyone could help me with this, it would be real appreciated
Thanks a lot
I am writing a application which has a print function. Everything
works fine with the printing function, except for the fact that i
can't seem to get the printing options that I enter in the
printDialog...
private PrintDocument printDoc = new PrintDocument();
private PrintDocument printQualifier = new PrintDocument();
private PageSettings pgSettings = new PageSettings();
private System.Windows.Forms.PrintDialog dlgPrint;
[...]
private void mnuPrint_Click(object sender, System.EventArgs e)
{
printDoc.DefaultPageSettings = pgSettings;
dlgPrint.Document = printDoc;
PrinterSettings settings = new PrinterSettings();
dlgPrint.PrinterSettings = settings;
if (dlgPrint.ShowDialog() == DialogResult.OK)
{
settings = dlgPrint.PrinterSettings;
/*This is my problem. copies will not take the value I
entered in the print dialog*/
int copies = settings.Copies;
printDoc.Print();
}
}
If anyone could help me with this, it would be real appreciated
Thanks a lot