IC Imaging Control .NET

First Steps Visual Studio .NET 2010

First Steps Visual Studio .NET 2010

This chapter shows you how to get started with IC Imaging Control in Visual Studio 2010.

With just a few mouse clicks and one line of code, you will be able to display a live video image in your .NET program. This article shows how to create a Visual Basic™ project. The steps to create a C#™ project are similar.

Creating the Project

Assuming that you have already run the IC Imaging Control installation program and started Visual Studio .NET, the next step is to create a project. To do this select the "New" command from the "File" menu, then select "Project".

Now choose "Visual Basic" from the templates and "Windows Forms Application". Name the application "FirstStep". You may select the .NET Framework version here. It can be every version starting from 2.0. Then click the OK button to create the new project.

image

Now that the project has been created, select the "Components" tab from the "Toolbox". If there is no "Toolbox", select "Toolbox" from the "View" menu.

Right click on the "Toolbox" and choose "Choose Items..." from the context menu. The "Choose Toolbox Items" dialog is displayed. Scroll down until ICImagingControl is shown:

Make sure its version starting with 3.2 and it is checked. Then click the "OK" button.

image

ICImagingControl is now listed in the "Toolbox" and ready to use.

image

Creating the Control

Select the ICImagingControl component from the "Toolbox" and draw it on the form of your project. A white rectangle should appear on the form. Right click on that control and select "Properties" from the context menu to make the "Properties" window of the ICImagingControl appear.

Selecting a Video Source

In the properties window select the "Device" property and click the button "..."

image

Making Device Settings

A dialog will appear and you can select a device. You can also configure the video norm, the video format, and the input channel.

image

Adjusting Image Settings

If you want to adjust the image settings, select the "VCDPropertyItems" property and click the "..." button:

image

A dialog appears in which you can configure the image settings. The live video is also running, while the property dialog is open, so that you can see the result of your adjustments

image

Adding Program Code

Now that the video capture device is configured, only a single line of code in the FormLoad event is needed to display a live image:

[VB.NET]
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load IcImagingControl1.LiveStart() End Sub
[C#]
private void Form1_Load(object sender, System.EventArgs e) { icImagingControl1.LiveStart(); }

Running the Program

You have now finished. You are now ready to start, debug and watch your program display a live video.

<< Programmer's Guide

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us