Page 1 of 1

Set Default Scanner-Device without Dialog?

Posted: Tue Feb 17, 2015 1:16 pm
by dfboris
In the Advanced Twain Demo you can set the Default-Scanner via a Dialog:
deviceManager.ShowDefaultDeviceSelectionDialog()

Is there a way to set the Default Device without that Dialog?

I have a Scanner-Dialog (with Scan-Button, Preview, etc.) where the user can select the Device out of the Device-List. If the user selects a device out of my ComboBox, i would like to set that Device as the Default, so the user doesn't need to switch that over and over again.

Thank you

Re: Set Default Scanner-Device without Dialog?

Posted: Wed Feb 18, 2015 9:27 am
by Alex
Hello Boris,

TWAIN specification allows to change the default device only if you use standard TWAIN device selection dialog.

In your scanner dialog (custom UI) you need save the user choice when dialog is closed and restore the user choice when dialog is opened.

Best regards, Alexander

Re: Set Default Scanner-Device without Dialog?

Posted: Wed Feb 18, 2015 11:44 am
by dfboris
Ah, OK, so it's a limitation of TWAIN - Good to know.

I think i need to store some other settings too, so i can save the device-name too.

Thank you