Printer Ports

Just wondering how i can retrieve the port of the printer that i have selected from the PrintDialog
Who is Participating?
PAQed, with points refunded (200)
ee_ai_construct - CS Mod
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
_versamps_Author Commented:
string sPath = "Win32_Printer.DeviceID='" + <printer name> + "'";
ManagementPath path = new ManagementPath(sPath);
ManagementObject ob = new ManagementObject (path);
string sPort = ob["PortName"].ToString ();
_versamps_Author Commented:
asked this question a while back but i figured it out .. this is the method in case u need it also
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.