A
Andrew
Hello, friends,
We need to programmatically change default printer in our c#.net 2005
application. We tried:
System.Drawing.Printing.PrinterSettings oPS = new
System.Drawing.Printing.PrinterSettings();
try
{
oPS.PrinterName = defaultPrinterName;
}
catch (System.Drawing.Printing.InvalidPrinterException ix)
{
Console.WriteLine(ix.Message);
return false;
}
finally
{
oPS = null;
}
but, no luck. The thrid party applications, say MS Word/NotePad, still use
previous default printer, not the new specified one.
Any ideas? Thanks a lot.
We need to programmatically change default printer in our c#.net 2005
application. We tried:
System.Drawing.Printing.PrinterSettings oPS = new
System.Drawing.Printing.PrinterSettings();
try
{
oPS.PrinterName = defaultPrinterName;
}
catch (System.Drawing.Printing.InvalidPrinterException ix)
{
Console.WriteLine(ix.Message);
return false;
}
finally
{
oPS = null;
}
but, no luck. The thrid party applications, say MS Word/NotePad, still use
previous default printer, not the new specified one.
Any ideas? Thanks a lot.