hi
I used the following code to read the scanner file and review it in the image box with twain scanner.
It works well if the scanner is connected to the computer.
If the scanner is not connected, the code stops the window form and does not close.
I want a way to check the scanner connection or cancel if the scanner is not connected to the device (pc)
Try
Dim s As Collection
s = SCANNER.ScanImages()
For Each k In s
PictureBox1.Load(k)
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try