Printer Checking

  • Thread starter Thread starter John Bowman
  • Start date Start date
J

John Bowman

Hi All,

Can someone please show me a some clean & reliable method for determining
the following (I'm using C# and the App only supportsWinXp or 2K):

1) Is a default printer assigned & which it is?

2) Is the default printer available for use?

TIA,
 
Hi,

The following C# code, you can use to determine the default printer.

System.Drawing.Printing.PrinterSettings prntSettigns = new
System.Drawing.Printing.PrinterSettings();

string strDefaultPrinter = prntSettigns.PrinterName;

I am not able to get your second question. However there is Isvalid property
of PrinterSettings which can be used to check that the printer is Valid or
not.

Hope it is some help to you.

Thanks and Regards,

Piyush Thakuria
 
Back
Top