Re: how to check if printer is offline/connected in vb .Net

  • Thread starter Ken Tucker [MVP]
  • Start date
K

Ken Tucker [MVP]

Hi,


Add a reference to system.management

Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_Printer")

moReturn = moSearch.Get

For Each mo In moReturn

Debug.WriteLine(String.Format("{0} Status {1} ", mo("Name"), mo("Status")))

Next



Ken

----------------------------

(Type your message here)
i am new to vb.net.
i am developing one application using it.i need to know the printer status
before sending anything to the printer.
i am using an icon in the status bar for this one.i want to display the
status message when i click on the icon.if anybody know the solution for
this one please help me.it's very urgent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top