简体   繁体   中英

How can I check if a printer is physically connected into my PC?

I am new to C# and I am using windows forms.

I built an EPOS application where it prints receipt if the printer is connected to my PC via USB port. The problem is if the printer is not physically connected then the document will be pending (as shown in the screenshot).

在此处输入图片说明

My question:

How can I check if the printer is physically connected (plugged) into my PC?

I already seen those questions 1 and 2 and the answers are not helpful because non of them mentioned how to check if the printer is physically connected but they only list all the printers names and some other information.

Anyone knows how to do that? Please help. Thank you

The only way to know if a printer is physically connected to your PC is by physically checking the connection. This isn't a Pun, its an actual answer...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM