Printing issues on Vista

T

TKuehnapfel

HI

I programmed a software on XP with the .Net framework 2.0. In this
software I use the following code fragment to setup the printer:

PrintDialog myPrintDialog = new PrintDialog();
myPrintDialog.Dialog.AllowCurrentPage = false;
myPrintDialog.AllowPrintToFile = false;
myPrintDialog.AllowSomePages = false;
myPrintDialog.PrintToFile = false;
myPrintDialog.ShowHelp = false;
myPrintDialog.ShowNetwork = false;

DialogResult res = myPrintDialog.ShowDialog(this);
if (res != DialogResult.OK)
{
Trace.WriteLine("Dialog = " +res.ToString(),
"[UcPrintingOptions,SetupThePrinting]");
return false;
}

It works fine on XP but if I run the program on Vista, the ShowDialog
function returns cancel. The weird thing is that the dialog not even
pops up. So, I'm not even able to hit the cancel button.

The Vista box, I got the error from, has "FAX" and a "Microsoft XPS
Document Writer" as printers installed. In the regedit I can see that
the .Net Framework 2.0 and 3.0 is installed.

Does any one has a clue what is going wrong? Thanks for any help.

Cheers
Thorsten
 

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

Top