Hi friends.
I have 2 printers throught the network each are connected to a print server
I redirect the printer with .bat file in windows startup
Print Server 1
Net Use LPT1 :/DELETE
Net Use LPT1 :\\192.168.1.1\Printer1
Print Server 2
Net Use LPT2 :/DELETE
Net Use LPT2 :\\192.168.1.2\Printer2
Sometimes when there is a network like "Request Time Out", when User are going to print the application hang
I use this code to check printer status but the application hang again
Is there is a way to check the print servers throught the network that the application don't hangCode:Private Function CheckPrinterStatus(ByVal LPTPort as String) as Boolean On Local Error GoTo PrinterError: Select Case LPTPort Case LPT1: Open LPT1 For Output #1 Case LPT2: Open LPT2 For Output #1 end select Close #1 Exit Function PrinterError: Select Case LPTPort Case LPT1: CheckPrinterStatus = True MsgBox "Check Print Server 1" Case LPT2: CheckPrinterStatus = True MsgBox "Check Print Server 2" End Select End sub
I'll Apreciate a lot if someone can help me.
Cabral





Reply With Quote