Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
am using .net 2.0 version, window application
I want to get the printer name which is installed in system,
then if that printer is connected to system
then we have to get the printer status(like: ready,paper out, offline, low paper,paper jam,etc ).

with below code am getting the printer name

C#
string query = string.Format("SELECT * from Win32_Printer");
            ManagementObjectSearcher searcher = new ManagementObjectSearcher(query);
            ManagementObjectCollection coll = searcher.Get();
            foreach (ManagementObject printer in coll)
            {
                MessageBox.Show(printer.ToString());
            }


but now i want to get the status,
Posted
Updated 24-Feb-12 2:30am
v2

1 solution

Did you see this?

http://msdn.microsoft.com/en-us/library/Aa394363[^]

I seem to recall there being problems with retrieving info on remote printers.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900