B
Bruce Wood
Trint,
A couple of other notes.
First, you do realize that you don't need the static variable Class1.pd
in order to get your hands on the paper sources for the printer from
within pd_PrintPage. You can get that this through the
PrintPageEventArgs, like this:
ev.PageSettings.PaperSource =
ev.PageSettings.PrinterSettings.PaperSources[...];
Second, I just want to clarify my previous note about the combo box. I
understand what you're trying to do in selecting different paper
sources (I think that you see that it's working, just not the way that
you want). I just don't understand why you're involving a combo box. It
looks to me as though
ev.PageSettings.PaperSource =
ev.PageSettings.PrinterSettings.PaperSources[comboBox1.SelectedIndex =
4];
is exactly the same as
ev.PageSettings.PaperSource =
ev.PageSettings.PrinterSettings.PaperSources[4];
I don't understand why you're involving the combo box at all. I think
that I need to know what was the business requirement behind the combo
box thing... what was the original idea that led you to use a combo box.
A couple of other notes.
First, you do realize that you don't need the static variable Class1.pd
in order to get your hands on the paper sources for the printer from
within pd_PrintPage. You can get that this through the
PrintPageEventArgs, like this:
ev.PageSettings.PaperSource =
ev.PageSettings.PrinterSettings.PaperSources[...];
Second, I just want to clarify my previous note about the combo box. I
understand what you're trying to do in selecting different paper
sources (I think that you see that it's working, just not the way that
you want). I just don't understand why you're involving a combo box. It
looks to me as though
ev.PageSettings.PaperSource =
ev.PageSettings.PrinterSettings.PaperSources[comboBox1.SelectedIndex =
4];
is exactly the same as
ev.PageSettings.PaperSource =
ev.PageSettings.PrinterSettings.PaperSources[4];
I don't understand why you're involving the combo box at all. I think
that I need to know what was the business requirement behind the combo
box thing... what was the original idea that led you to use a combo box.