Hi, I'm new here and evaluating the VB.NET Twain SDK for Kodak i5850.
we would like to scan jobwise an load twain settings from file. To adjust the scanjobs, we want to use the GUI of the twain driver in that way:
1. device.LoadSettings(fs) 'loading the scanner settings from file
2. <adjust by GUI>
3. device.SaveSettings(fs) 'save the new scanner setting to file
Actually I cannot find a method to call the Twain UI without scanning (only to adjust). I know from another scan software the this is possible for this scanner and twain driver.
Thank you very much.
Sincerely, Hans
Re: Do scanner setting by Twain GUI (CustomDsData)
thank you very much for your information. Loading the settings works fine:
device.Open()
LoadSettings("C:\_Share\Source\_NET\VintaSoft\Patch2_i5850.twn", device)
device.ShowSetupDialog() 'to adjust some new settings
but saving the new settings does not work, obiously because the device is closed by ShowSetupDialog(),
SaveSettings(device, "C:\_Share\Source\_NET\VintaSoft\Patch2_i5850_out.twn")
device.Close()
When reopening the device an saving then, the adjstments made in ShowSetupDialog() are not present in the new file "Patch2_i5850_out.twn", There seems to be default settings. What can I do do preserve / save the Settings?
Sincerely, Hans
Public Sub LoadSettings(ByVal sFile As String, ByVal device As Vintasoft.Twain.Device)
Using fs As New IO.FileStream(sFile, IO.FileMode.Open, IO.FileAccess.Read)
device.LoadSettings(fs)
End Using
End Sub
Public Sub SaveSettings(ByVal device As Vintasoft.Twain.Device, ByVal sFile As String)
Using fs As New System.IO.FileStream(sFile, System.IO.FileMode.Append, System.IO.FileAccess.Write)
device.SaveSettings(fs)
End Using
End Sub
Re: Do scanner setting by Twain GUI (CustomDsData)
After calling the Device.ShowSetupDialog method you need wait for Device.UserInterfaceClosed event and close/disable the device in the event handler if this necessary. Please save settings and close the device in handler of Device.UserInterfaceClosed event.
Best regards, Alexander
Re: Do scanner setting by Twain GUI (CustomDsData)