Click here to Skip to main content
15,892,809 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How can I set a web radio value Pin
Ocean Man8-Nov-05 11:48
Ocean Man8-Nov-05 11:48 
AnswerRe: How can I set a web radio value Pin
Allah On Acid8-Nov-05 16:20
Allah On Acid8-Nov-05 16:20 
AnswerRe: How can I set a web radio value Pin
Steve Pullan8-Nov-05 18:10
Steve Pullan8-Nov-05 18:10 
GeneralRe: How can I set a web radio value Pin
Ocean Man9-Nov-05 5:52
Ocean Man9-Nov-05 5:52 
GeneralRe: How can I set a web radio value Pin
Ocean Man9-Nov-05 6:07
Ocean Man9-Nov-05 6:07 
GeneralRe: How can I set a web radio value Pin
Steve Pullan9-Nov-05 11:55
Steve Pullan9-Nov-05 11:55 
QuestionImport Data From Oracle *.DMP File to SQL Server Pin
Nadeem Akhter7-Nov-05 16:02
Nadeem Akhter7-Nov-05 16:02 
QuestionPrinter status is Unknown Pin
VanitaJ7-Nov-05 12:55
VanitaJ7-Nov-05 12:55 
Hi all
I have the following piece of code where I am checking for the status of the printer. But I am not able to figure out why even while the printer is priting Printer.PrinterStatus returns 2 which corresponds to Unknown printer status

Please let me know if the code is wrong and is there any other way to check for the status of the printer.

Code is
Private Sub btnPrinter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrinter.Click
Dim PrinterSet As Object
Dim Printer As Object
Dim DefaultPrinter As Object

PrinterSet = GetObject("winmgmts://localhost")
DefaultPrinter = PrinterSet.ExecQuery("Select * from Win32_Printer Where Default = True")

For Each Printer In DefaultPrinter
MsgBox(Printer.Name & ": " & Printer.PrinterStatus)
Next Printer
End Sub

Thanks and Regards
VanitaJ

-- modified at 19:34 Monday 7th November, 2005
AnswerRe: Printer status is Unknown Pin
VanitaJ8-Nov-05 5:55
VanitaJ8-Nov-05 5:55 
GeneralRe: Printer status is Unknown Pin
Dave Kreskowiak8-Nov-05 10:04
mveDave Kreskowiak8-Nov-05 10:04 
GeneralRe: Printer status is Unknown Pin
VanitaJ8-Nov-05 12:48
VanitaJ8-Nov-05 12:48 
GeneralRe: Printer status is Unknown Pin
Dave Kreskowiak9-Nov-05 4:23
mveDave Kreskowiak9-Nov-05 4:23 
GeneralRe: Printer status is Unknown Pin
KaptinKrunch8-Nov-05 10:54
KaptinKrunch8-Nov-05 10:54 
QuestionTCP Client Pin
Brent Lamborn7-Nov-05 10:28
Brent Lamborn7-Nov-05 10:28 
AnswerRe: TCP Client Pin
capitan_cavernicola13-Jan-06 0:01
capitan_cavernicola13-Jan-06 0:01 
QuestionMicrosoft Web Browser Control Pin
Mo_developer7-Nov-05 5:48
Mo_developer7-Nov-05 5:48 
AnswerRe: Microsoft Web Browser Control Pin
Brent Lamborn7-Nov-05 12:29
Brent Lamborn7-Nov-05 12:29 
QuestionMultiple comboboxes in datagrid.... Pin
oakleaf7-Nov-05 5:26
oakleaf7-Nov-05 5:26 
AnswerRe: Multiple comboboxes in datagrid.... Pin
rudy.net9-Nov-05 17:55
rudy.net9-Nov-05 17:55 
QuestionSequential Structures with arrays Pin
rand197-Nov-05 4:48
rand197-Nov-05 4:48 
AnswerRe: Sequential Structures with arrays Pin
Joshua Quick7-Nov-05 7:06
Joshua Quick7-Nov-05 7:06 
GeneralRe: Sequential Structures with arrays Pin
rand197-Nov-05 7:29
rand197-Nov-05 7:29 
GeneralRe: Sequential Structures with arrays Pin
Joshua Quick7-Nov-05 7:43
Joshua Quick7-Nov-05 7:43 
GeneralRe: Sequential Structures with arrays Pin
rand197-Nov-05 8:19
rand197-Nov-05 8:19 
GeneralRe: Sequential Structures with arrays Pin
Joshua Quick7-Nov-05 9:09
Joshua Quick7-Nov-05 9:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.