ScannerAvailable Example VB

This example shows how to determine if TWAIN Scanning is available before you enable or disable scanning options within the application.

Private Sub Form_Load()
     If ImgScan1.ScannerAvailable Then
        mnuScanNew.Enabled = True
        mnuScanAppendPage.Enabled = True
        mnuScanInsertPage.Enabled = True 
    'If ScannerAvailable returns false, disable scanner-related
    'menu options.
     Else
        mnuScanNew.Enabled = False
        mnuScanAppendPage.Enabled = False
        mnuScanInsertPage.Enabled = False
    End If
End Sub