Default Printer

  • Thread starter Thread starter Ian Semmel
  • Start date Start date
Ian said:
How do I find out what the default printer is ?

For .NET 1.1 I believe you'd have to P/Invoke down to the Win32 function
EnumPrinters and specify PRINTER_ENUM_DEFAULT in the Flags parameter.

http://pinvoke.net/default.aspx/winspool/EnumPrinters.html

Although you can probably use WMI to get this as well (check out the
System.Management namespace).

For .NET 2.0 there is the System.Printing namespace, specifically
LocalPrintServer.DefaultPrintQueue. (At least I don't think
System.Printing was in .NET 1.1 and priot.)
 

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

Back
Top