Leadtools TWAIN (Leadtools.Twain assembly)

SelectSource Method

Show in webframe
Example 





String contains source name to be selected
Displays the TWAIN dialog box to be used to select a TWAIN source for acquiring images.
Syntax
public DialogResult SelectSource( 
   string sourceName
)
'Declaration
 
Public Function SelectSource( _
   ByVal sourceName As String _
) As DialogResult
'Usage
 
Dim instance As TwainSession
Dim sourceName As String
Dim value As DialogResult
 
value = instance.SelectSource(sourceName)

            

            
public:
DialogResult SelectSource( 
   String^ sourceName
) 

Parameters

sourceName
String contains source name to be selected

Return Value

One of the DialogResult values.
If an error occurs, an exception is thrown.
Remarks
For more information, refer to Managing the TWAIN Source.
Example
Copy Code  
Imports Leadtools
Imports Leadtools.Twain

Public Sub SelectSourceExample(ByVal parent As IWin32Window)
   Dim session As TwainSession = New TwainSession()
   session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None)

   If session.SelectSource(String.Empty) <> DialogResult.OK Then
      MessageBox.Show("Error Selecting Source")
   End If

   session.Shutdown()
End Sub
using Leadtools;
using Leadtools.Twain;

public void SelectSourceExample(IWin32Window parent)
{
   TwainSession session = new TwainSession();
   session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);

   if (session.SelectSource(string.Empty) != DialogResult.OK)
      MessageBox.Show("Error Selecting Source");

   session.Shutdown();
}
Requirements

Target Platforms

See Also

Reference

TwainSession Class
TwainSession Members
Startup Method
Shutdown Method
IsAvailable Method
Acquire Method

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.