Leadtools TWAIN (Leadtools.Twain assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
SelectedSourceName Method
See Also 
Leadtools.Twain Namespace > TwainSession Class : SelectedSourceName Method



Gets the name of the selected TWAIN source. This name is provided by the manufacturer.

Syntax

Visual Basic (Declaration) 
Public Function SelectedSourceName() As String
Visual Basic (Usage)Copy Code
Dim instance As TwainSession
Dim value As String
 
value = instance.SelectedSourceName()
C# 
public string SelectedSourceName()
C++/CLI 
public:
String^ SelectedSourceName(); 

Example

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

   ' Twain data source name is case-sensitive
   session.SelectSource("TWAIN_32 Sample Source")
   MessageBox.Show(session.SelectedSourceName())
   session.Shutdown()
End Sub
C#Copy Code
public void SelectedSourceNameExample(IWin32Window parent)
{
   TwainSession session = new TwainSession();
   session.Startup(parent, "manufacturer", "productFamily", "version", "application", TwainStartupFlags.None);

   // Twain data source name is case-sensitive
   session.SelectSource("TWAIN_32 Sample Source");
   MessageBox.Show(session.SelectedSourceName());
   session.Shutdown();
}

Remarks

For more information, refer to Managing the TWAIN Source.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also