Take the following steps to create and run a program that uses LEADTOOLS Workflow Scan Activity:
- Start Visual Studio .NET.
- Choose File->New->Project… from the menu.
- In the New Project dialog box, choose either "Visual C# Projects" - Workflow or "Visual Basic Projects" - Workflow in the Templates choose "Sequential Workflow Console Application".
- Type the project name as "Using Leadtools Workflow Scan Activity" in the Project Name field, and then choose OK. If desired, type a new location for your project or select a directory using the Browse button, and then choose OK .
-
In the "Solution Explorer" window, right-click on the "References" folder (For a VB project, right-click on the project file in solution explorer), and select "Add Reference…" from the context menu. In the "Add Reference" dialog box, select the ".NET" tab and browse to Leadtools For .NET "\LEAD Technologies\LEADTOOLS 16.5\Bin\DotNet\Win32 " folder and select the following DLLs:
- Leadtools.Workflow.Scan.dll
- Leadtools.Workflow.Raster.dll
-
To add the LEADTOOLS activities to your toolbox, right-click the toolbox and select "Choose Items". In the "Choose Toolbox Items" dialog, go the tab "Activities" , and browse for and select the activities from the following DLLs (Namespace Leadtools.Workflow):
- Leadtools.Workflow.Scan.dll
- Leadtools.Workflow.Raster.dll
- Double-click Workflow1 to open it in design mode, then select the following activities from the toolbox and place them on the workflow in the order specified:ScanActivity, SaveImageActivity.
- Set the Url and Format properties of the SaveImageActivity to "c:\result.jpg" and "Jpeg" respectively.
- Bind the Image property of the SaveImageActivity to the WorkflowImage property of the ScanActivity.
- Set the output folder of the project .exe to where LEADTOOLS 16.5 .Net DLLs are installed. For example: \LEAD Technologies\LEADTOOLS 16.5\Bin\Dotnet\Win32
- Build, and Run the program to test it.