GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / TwainSelectSource Method / TwainSelectSource(IntPtr) 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(IntPtr) 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 IntPtr _
) As Boolean
public bool TwainSelectSource( 
   IntPtr HANDLE
)
public function TwainSelectSource( 
    HANDLE: IntPtr
): Boolean; 
public function TwainSelectSource( 
   HANDLE : IntPtr
) : boolean;
public: bool TwainSelectSource( 
   IntPtr HANDLE
) 
public:
bool TwainSelectSource( 
   IntPtr 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