Hi Alex,
Is there a way through the Vintasoft Twain SDK to detect if a scanner is connected or not?
Using the current devicemanager class, whether or not I have a scanner connected, it always shows a TWAIN device available.
I would like to disable some UI elements if there isn't a scanner connected, so the end user is aware of it.
So far I am not having much luck in getting this to work.
Thank You!
Detecting if a scanner is connected
Moderator: Alex
Re: Detecting if a scanner is connected
Hi,
The DeviceManager class provides information about installed TWAIN drivers. Next, you need try to open the device - device is connected and ready to use if you can open the device, device is not connected or not ready for use if you cannot open the device.
Best regards, Alexander
The DeviceManager class provides information about installed TWAIN drivers. Next, you need try to open the device - device is connected and ready to use if you can open the device, device is not connected or not ready for use if you cannot open the device.
Best regards, Alexander
Re: Detecting if a scanner is connected
Hi,
I have a similar problem, with Canon devices reporting in .Devices collection while disconnected.
The problem is that Device.Open() show a messagebox when not connected, even with ShowUI and ShowIndicators set to false.
That's a problem when I want to enumerate devices and select the one actually connected : lots of useless messagebox.
You can easily reproduce the issue by installing this driver, even without the device.
http://www.canon.fr/support/consumer_pr ... pe=drivers
Is it something you can fix on your side ?
Thanks.
I have a similar problem, with Canon devices reporting in .Devices collection while disconnected.
The problem is that Device.Open() show a messagebox when not connected, even with ShowUI and ShowIndicators set to false.
That's a problem when I want to enumerate devices and select the one actually connected : lots of useless messagebox.
You can easily reproduce the issue by installing this driver, even without the device.
http://www.canon.fr/support/consumer_pr ... pe=drivers
Is it something you can fix on your side ?
Thanks.
Re: Detecting if a scanner is connected
Hi,
The DeviceManager class provides information about installed TWAIN drivers. Next, you need try to open the device - device is connected and ready to use if you can open the device, device is not connected or not ready for use if you cannot open the device.
Unfortunately, most TWAIN drivers show dialog with error message if scanner is not connected or online. Message dialog depends from TWAIN driver developer and in most cases cannot be disabled.
Best regards, Alexander
The DeviceManager class provides information about installed TWAIN drivers. Next, you need try to open the device - device is connected and ready to use if you can open the device, device is not connected or not ready for use if you cannot open the device.
Unfortunately, most TWAIN drivers show dialog with error message if scanner is not connected or online. Message dialog depends from TWAIN driver developer and in most cases cannot be disabled.
Best regards, Alexander