
This example shows a simple VB.NET application to acquire an image from a TWAIN device (scanner or webcam) and display the image.
To use this demo, you will need to download two files:
Trial version of the ActiveX control TwainControlX. (796kB)
Zip file of VB.NET demo project. (37kB)
Install TwainControlX, then extract the VB.NET demo files from tcxdemovbnet.zip, keeping the same directory structure. Start VB.NET, and open the project in solution file 'TCX_Demo_VBNET\TCX_Demo_VBNET.sln'.
The device to be used is selected from a ComboBox. This is populated with the names of all installed devices when the project is first run.
VB.NET cannot recognise indexed properties of ActiveX controls, such as the DeviceName property of TwainControlX. To overcome this limitation, prefix the property name with 'get_' to read the property or 'set_' to write. The code to do this can be found in the Sub Form1_Load.
A Setup project is included with this demo. To build an installer (.msi file), select TCX_Demo_VBNET_Setup in the Solution Explorer window, then Build/Build TCX_Demo_VBNET_Setup from the menu.
© Ciansoft 2009. | Ciansoft is a trading name of IC Technologies Ltd.