Set Default Scanner-Device without Dialog?

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Moderator: Alex

Post Reply
dfboris
Posts: 8
Joined: Mon Nov 10, 2014 11:17 am

Set Default Scanner-Device without Dialog?

Post by dfboris » Tue Feb 17, 2015 1:16 pm

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

Alex
Site Admin
Posts: 1462
Joined: Thu Jul 10, 2008 2:21 pm

Re: Set Default Scanner-Device without Dialog?

Post by Alex » Wed Feb 18, 2015 9:27 am

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

dfboris
Posts: 8
Joined: Mon Nov 10, 2014 11:17 am

Re: Set Default Scanner-Device without Dialog?

Post by dfboris » Wed Feb 18, 2015 11:44 am

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest