|
Visual Basic .NET Sample: Acquire and save to BMP file |
Top Previous Next |
|
The following Visual Basic .NET function is all that is required to do the following:
___________________________________________________________ Private Sub ExampleFunction( )
Private TwainOK As Integer
Private MyDTwain As DTWAINAPI Private RetVal As Integer
With MyDTwain Dim Status As Integer
Rem Check if TWAIN is installed TwainOK = .DTWAIN_IsTwainAvailable( ) SelectedSource = 0 If TwainOK = 1 Then
Rem Initialize DTWAIN TwainOK = .DTWAIN_SysInitialize( ) RetVal = .DTWAIN_TwainSave( "-f test.bmp" ) Rem shut down TWAIN system and DTWAIN. End If End With End Sub ___________________________________________________________
For Visual Basic .NET, all that is needed is to add the DTWAIN32_NET.BAS file to your project. This file contains the DTWAINAPI class which wraps the DTWAIN functions.
|