By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,939 Members | 1,541 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,939 IT Pros & Developers. It's quick & easy.

get printer status

P: n/a
I wrote this code to check the status of printer.But it says "Unknown" as
printer["status"].

/////////////////////////////////////////////////////////////////////////////
System.Management.ManagementObjectCollection printers = new
System.Management.ManagementClass("Win32_Printer") .GetInstances();

foreach(System.Management.ManagementObject printer in printers)
{

MessageBox.Show(printer["Name"].ToString()+"-"+printer["Status"].ToString());

////////////////////////////////////////////////////////////////////////////////////

Nov 16 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.