Loads from a file, settings of the opened source, e.g. DPI, paper size, color format.
public Boolean TwainLoadConfiguration( String FilePath );
Public Function TwainLoadConfiguration( ByVal FilePath As String ) As Boolean
|
Parameters |
Description |
|
FilePath |
The file to load to set the current device configuration. |
TRUE if successful, FALSE otherwise -> Use TwainGetLastResultCode() and TwainGetLastConditionCode() functions for diagnosing the error.
Before using this function check that the TWAIN state is TWAIN_SOURCE_OPEN (4)
To get the TWAIN state, use the TwainGetState() function.
Open device & load previously saved configuration from file
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oGdPictureImaging As New GdPictureImaging oGdPictureImaging.SetLicenseNumber("XXX") 'Replace XXX by valid demo or commercial KEY If oGdPictureImaging.TwainOpenDefaultSource(Me.Handle) Then If Not oGdPictureImaging.TwainLoadConfiguration("config1.cdd") = True Then MsgBox("Can't load current configuration. This capability is probably unsupported by the TWAIN device") End If 'You can start acquisition process here ! Else MsgBox("Can't open default source") End If End Sub
|
What do you think about this topic? Send feedback!
|
|
Copyright (c) 2009-2011 www.gdpicture.com. All rights reserved.
|