TWAIN scanning from VB (VB6 or VB.NET) using the csXImage ActiveX control

The ActiveX control csXImage includes a range of functions to acquire images from TWAIN compliant devices such as scanners and webcams.

This functionality is demonstrated with this simple VB application. The application is a single form which includes an instance of csXImage. When the project is run and the form fMain is loaded, the list of TWAIN devices available on the system is read by csXImage and used to populate a ComboBox. The user can then select a device from this list.

The device configuration (image size, resolution, pixel type) can either be set directly by the user or by using the default interface of the device. The image is then acquired using the Acquire button. There is also an option to save the image to disk.

This demo is available in two versions: one for use with Visual Basic 5 or 6, the other for use with Visual Basic.NET. The appropriate version can be downloaded from the links below.

Visual Basic.NET

To run this demo you need the csXImage trial ocx control installed on your system as well as MS Visual Studio.NET. The trial control and the example files are available below:

Download the trial csXImage control - csXImageTrial.exe (3 MB)

The demo VB.NET Twain project - TwainDemoVBNET.zip (66 KB)

Description of the sample VB.NET Twain project.

Visual Basic 5 or 6

To run this demo you need the csXImage trial ocx control installed on your system as well as MS Visual Basic 5 or 6. The trial control and the example files are available below:

Download the trial csXImage control - csXImageTrial.exe (3 MB)

The demo VB6 Twain project - TwainDemo.zip (5 KB)

Description of the sample VB6 Twain project.