restabro
asked on
How to get info from a PrintDialog box
I'm trying to get a couple of things from a PrintDialog box: I need to know if the "All", "Pages", or "Selection" radio button has been pushed and, if the "Pages" radiobutton is pushed, what pages have been entered.
I use the following code to determine whether the OK button is pushed, but I can't find much help on the AllowPrintPages and AllowSelection properties.
PrintDocument* pdoc = new PrintDocument();
PrintDialog* pd = new PrintDialog();
pd->Document = pdoc;
if (pd->ShowDialog() == DialogResult::OK)
{
etc.....
}
I use the following code to determine whether the OK button is pushed, but I can't find much help on the AllowPrintPages and AllowSelection properties.
PrintDocument* pdoc = new PrintDocument();
PrintDialog* pd = new PrintDialog();
pd->Document = pdoc;
if (pd->ShowDialog() == DialogResult::OK)
{
etc.....
}
PrintDialog.PrinterSetting s property returns PrinterSettings which contains this information.
ASKER
That gets me a little closer, but please provide coding examples for the following conditions:
1. Determining if the "All" button has been selected
2. Determining if the "Pages" button has been selected
3. If the "Pages" button has been selected, how to determine what the "From" page is
4. Determining if the "Selection" button was pushed
Note that I increased the point total to 500. Thank you.
1. Determining if the "All" button has been selected
2. Determining if the "Pages" button has been selected
3. If the "Pages" button has been selected, how to determine what the "From" page is
4. Determining if the "Selection" button was pushed
Note that I increased the point total to 500. Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.