Can I monitor PrintDocument.Print?

  • Thread starter Thread starter trint
  • Start date Start date
T

trint

I want to do something like this to interrupt the print process (But
this does not work because the error is "cannot implicitly conver type
void to bool"):

while(pd.Print())
{
pCounter++;

if(printerSettings.Copies == 2)
{
pd.DefaultPageSettings.PaperSource =
pd.PrinterSettings.PaperSources[comboBox1.SelectedIndex = 5];

}
if(printerSettings.Copies == 1)
{
pd.DefaultPageSettings.PaperSource =
pd.PrinterSettings.PaperSources[comboBox1.SelectedIndex = 6];

}
if(pCounter == 6)
break;

}
Thanks,
Trint
 
When are you expecting the while loop to complete a loop? When a page
prints? When a line prints?

What are you trying to do, in the larger sense? Can you state what you
want to do in English, rather than in code?
 
Bruce,
I want one PrintDocument to print from three separate papersources like
this:
pd.DefaultPageSettings.PaperSource =
pd.PrinterSettings.PaperSources[comboBox1.SelectedIndex = 4];
pd.DefaultPageSettings.PaperSource =
pd.PrinterSettings.PaperSources[comboBox1.SelectedIndex = 5];
pd.DefaultPageSettings.PaperSource =
pd.PrinterSettings.PaperSources[comboBox1.SelectedIndex = 6];

And I just want to set "printerSettings.Copies = 3;" one time.

Or, here is my other option:
If I can figure out how to render three documents and send them to the
laserprinter only one time.
Thanks,
Trint

..Net programmer
(e-mail address removed)
 
Back
Top