AcquisitionShowSelectSource Method |
Displays the "Select Source" dialog, allowing end users to select the device they want to use.
Namespace:
Atalasoft.Twain
Assembly:
Atalasoft.DotTwain (in Atalasoft.DotTwain.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax public Device ShowSelectSource()
Public Function ShowSelectSource As Device
Return Value
Type:
Device The device selected by the user.
Exceptions Exception | Condition |
---|
| Thrown if twain does not exist on the system. |
| Thrown is there is a Twain error during this process. |
Remarks If the user presses the "Cancel" button, this will return the current system default device. If no
devices are listed in the dialog, this will return null (Nothing in VB).
Examples this.device = this.acquisition.ShowSelectSource();
if (this.device == null)
{
MessageBox.Show(this, "No Twain devices were found on your system.");
return;
}
ShowSelectVB (Visual Basic)
Me.device = Me.acquisition.ShowSelectSource()
If Me.device Is Nothing Then
MessageBox.Show(Me, "No Twain devices were found on your system.")
Return
End If
See Also