Leadtools.Twain Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.8.31
SelectedSourceName Method
See Also  Example
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()
Managed Extensions for 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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also