|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to.... Question.....How to query the printer about out of paper or paper jam or any other error
message. I have written a print application which does the printing. VB.Net and .Net Framework 1.1. Windows 2000 Professional/Windows 2000 Server. Thank you, Pete Hi,
Check out Carls midi tools http://training.franklins.net/dotnet.aspx Ken --------------------- Show quoteHide quote "Pete Smith" <PeteSmit***@hotmail.com> wrote in message news:uPycBe5QGHA.1204@TK2MSFTNGP12.phx.gbl... > How to query the printer about out of paper or paper jam or any other > error > message. > I have written a print application which does the printing. > VB.Net and .Net Framework 1.1. Windows 2000 Professional/Windows 2000 > Server. > Thank you, > Pete > > Hi,
Sorry about that I posted the answer to the wrong question. Take a look at the WMI win32_printer class. There is a Detected Error State property which contains the info you are looking for http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_printer.asp Dim arErrorInfo() = _ {"Unknown", "Unknown", "Other", "No Error", _ "Low Paper", "No Paper", "Low Toner", _ "No Toner", "Door Open", "Jammed", "Offline", _ "Service Requested", "Output Bin Full"} 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 Dim strOut As String Dim intError As Integer = CInt(mo("DetectedErrorState")) strOut = String.Format("Name {0} - {1}", mo("Name"), arErrorInfo(intError)) Trace.WriteLine(strOut) Next Ken ---------------- Show quoteHide quote "Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message news:%23QcO0f8QGHA.1328@TK2MSFTNGP10.phx.gbl... > Hi, > > Check out Carls midi tools > > http://training.franklins.net/dotnet.aspx > > Ken > --------------------- > > "Pete Smith" <PeteSmit***@hotmail.com> wrote in message > news:uPycBe5QGHA.1204@TK2MSFTNGP12.phx.gbl... >> How to query the printer about out of paper or paper jam or any other >> error >> message. >> I have written a print application which does the printing. >> VB.Net and .Net Framework 1.1. Windows 2000 Professional/Windows 2000 >> Server. >> Thank you, >> Pete >> >> > >
Can't modify instance of a class from within the class!
WebBrowser Control Printing Garbage collection, Unmanaged code and SafeArrays Defining data types for fields, when you a create a file close Form1 & open Form2 Problem sending Report as EMail - wrong attach. name "untitled.txt" Regular Expression Question Fastest way to load jpg images ? Single event handler for menu UDPState |
|||||||||||||||||||||||