Solved

Printer Ports

Posted on 2003-11-09
5
293 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_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Change to file doesn't show up 16 93
C# Windows Form Navigation - Total Beginner 9 97
Need help with another query 10 54
Web page design problem 3 42
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

710 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