Problems printing

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
 
R

Ron Allen

Hugo,
There is a "known bug" with Framework 1.0 where this doesn't work. It
works for me in Framework 1.1.
Ron Allen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Print question 14
Printing Question Rephrased 2
Print directly from SSRS2008 0
Print Panel 4
Printing a WinForm as a Graphic 6
get the default printer 1
PictureBox to Print Page... 1
Printing Problems 4

Top