_versamps_
asked on
Printer Ports
Just wondering how i can retrieve the port of the printer that i have selected from the PrintDialog
I would also like to know this, Msdn has a wealth of information but i cant find anything to do with the status of a printer
ASKER
string sPath = "Win32_Printer.DeviceID='" + <printer name> + "'";
ManagementPath path = new ManagementPath(sPath);
ManagementObject ob = new ManagementObject (path);
string sPort = ob["PortName"].ToString ();
ManagementPath path = new ManagementPath(sPath);
ManagementObject ob = new ManagementObject (path);
string sPort = ob["PortName"].ToString ();
ASKER
asked this question a while back but i figured it out .. this is the method in case u need it also
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.