10.2.2.1   Basic Steps

Export

The first step is to export the program using the menu File→Export.... Here, select the language (C# - HALCON/.NET) and save it to file. The result is a new file with the given name and the extension “.cs”.

The C# Template

If the file has been exported using the option Use Export Template, it is intended to be used together with the predefined C# project that can be found in the directory

       %HALCONEXAMPLES%\c#\HDevelopTemplate

This project contains a form with a display window (HWindowControl) and a button labeled Run. Add the file generated by HDevelop to the project in the Solution Explorer (Add Existing Item). Now the project is ready for execution: Run the project and then press the button Run on the form, which will call the exported code.

Additional information about using the template can be found in the Programmer's Guide.