GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / TwainSelectSource Method / TwainSelectSource(Int32) Method
A window handle, that will act as the Source's parent, means Me.Handle or this.Handle.

In most applications, you can use nothing, but on Citrix and WTS this must be a top-level window or a child of a top-level window.






In This Topic
TwainSelectSource(Int32) Method
In This Topic
Displays the Source Manager's Select Source dialog box to enable selecting the TWAIN device for further usage. This dialog lists all available installed devices and allows the user to select the default one for next use.
Syntax
'Declaration
 
Public Overloads Function TwainSelectSource( _
   ByVal HANDLE As Integer _
) As Boolean
public bool TwainSelectSource( 
   int HANDLE
)
public function TwainSelectSource( 
    HANDLE: Integer
): Boolean; 
public function TwainSelectSource( 
   HANDLE : int
) : boolean;
public: bool TwainSelectSource( 
   int HANDLE
) 
public:
bool TwainSelectSource( 
   int HANDLE
) 

Parameters

HANDLE
A window handle, that will act as the Source's parent, means Me.Handle or this.Handle.

In most applications, you can use nothing, but on Citrix and WTS this must be a top-level window or a child of a top-level window.

Return Value

true if the method has been followed successfully, otherwise false. You can use the GdPictureImaging.TwainGetLastResultCode and the GdPictureImaging.TwainGetLastConditionCode methods to determine the reason for the method's failure.

Here are possible reasons for returning false:

  • The user canceled the Select Source dialog.
  • The Source Manager found no data sources installed.
  • There was a failure before the Select Source dialog could display.

Remarks
Please note that to open the selected device you need to use the GdPictureImaging.TwainOpenDefaultSource method.
See Also