Note: You should be familiar with the use of Windows Forms. |
Setting-up the IDE
1.Copy the uEyeDotNet.dll file into your project directory.
2.Open your project in Visual Studio.
3.In the "Solution Explorer" right-click on the "References" entry.
4.Select "Add reference". A dialog for adding references opens.
5.Open the "Browse" tab.
6.Select the uEyeDotNet.dll.
7.Click on "OK".
8.Open the project properties via the "Project > Properties" menu entry.
9.In the "Application" tab set the target framework to ".NET Framework 4.6.1".
Using the .NET interface
1.Create a uEye .NET object, e.g.
uEye.Camera cam = new uEye.Camera();
2.Now you can start working with the .NET interface.
Capturing the first image
1.Initialize the camera: cam.Init();
2.Allocate an default image memory: cam.Memory.Allocate(out s32MemId);
You can also allocate an image memory by using: cam.Memory.Allocate();
3.Capture a live image with cam.Acquisition.Capture(s32Wait); or a single image with cam.Acquisition.Freeze(s32Wait);
With s32Wait = uEye.Defines.DeviceParameter.Wait the image acquisition waits until an image is captured and returns afterwards. With s32Wait = uEye.Defines.DeviceParameter.DontWait the image acquisition returns immediately.
4.Display the image on the screen: cam.Display.Render(uEye.Defines.DisplayRenderMode mode)
mode selects different rendering modes, e.g. mode = uEye.Defines.DisplayRenderMode.FitToWindow
Using uEye .NET Framework Library
1.Add the uEyeDotNetFramework.dll library to the project.
2.To use the functions add:
using static uEye.Extensions;
3.Add the corresponding function calls, see uEye .NET Framework Library.