tags:

views:

142

answers:

1

I have a printdialog that I do the following with:

PrintDialog pd = new PrintDialog();
pd.AllowCurrentPage = true;
pd.UseEXDialog = true;
if (pd.ShowDialog() == DialogResult.OK) {

Once the user has hit OK, I need to see if the "Current Page" or the "All pages" button is highlighted so I can ... gosh ... print All pages or just the current page.

However, I have no clue where the corresponding property for .AllowCurrentPage is. It should be in the intellisense, but at the very least, in the documentation, which it isn't. (In fact, the documentation for PrintDialog notes that my above code should throw an exception for not setting .PrintSettings, which it doesn't.) Subsequent Googling turned up nothing.

+1  A: 

Found it. It's hidden here:

PrintDialog.PrinterSettings.PrintRange

It's an enum, so intellisense didn't prompt me with anything useful on my first pass. It would be really, really nice if this were documented on .AllowCurrentPage.

Thanatos
File it! https://connect.microsoft.com
Michael Petrotta
+1, Good suggestion. Filed.
Thanatos