First Steps Visual Studio .NET 7.1

This chapter shows you how to get started with IC Imaging Control.

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 Project" as "Project Type" and "Windows Application" as "Template". Name the application "FirstStep" and 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 "Add/Remove Items..." from the context menu. The "Customize Toolbox" dialog is displayed:

image

Click on the "Browse" button and browse to the installation directory of IC Imaging Control 3.0. The default installation directory is C:\Program Files\The Imaging Source Europe GmbH\IC Imaging Control 3.0. Enter the bin directory and open the file ImagingControl3.dll.

image

ICImagingControl is now listed in the "Customize Toolbox" dialog. Make sure it is checked and 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. 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.ObjectByVal 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 hit F5 and watch your program display a live video.

<< Programmer's Guide

This site is part of The Imaging Source Network. Other sites include Company Portal, Image Processing, Astronomy Cameras, Astronomy Cameras Blog, Blog caméras d'astronomie, Astronomy Cameras Competition, TX Text Control, TX Text Control Blog and Forums.