Solved

Printer Ports

Posted on 2003-11-09
5
282 Views
Last Modified: 2010-04-16
Just wondering how i can retrieve the port of the printer that i have selected from the PrintDialog
0
Comment
Question by:_versamps_
  • 2
5 Comments
 

Expert Comment

by:WVW
ID: 9763007
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
0
 

Author Comment

by:_versamps_
ID: 10519968
string sPath = "Win32_Printer.DeviceID='" + <printer name> + "'";
ManagementPath path = new ManagementPath(sPath);
ManagementObject ob = new ManagementObject (path);
string sPort = ob["PortName"].ToString ();
0
 

Author Comment

by:_versamps_
ID: 10519972
asked this question a while back but i figured it out .. this is the method in case u need it also
0
 

Accepted Solution

by:
ee_ai_construct earned 0 total points
ID: 11747192
PAQed, with points refunded (200)
ee_ai_construct - CS Mod
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question