IC Imaging Control ActiveX

First Steps in Visual Basic 6

First Steps in Visual Basic 6

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 Visual Basic program.

Creating the Project

Assuming that you have already run the IC Imaging Control installation program and started Visual Basic, the next step is to create a project. To do this begin by selecting the 'New Project' command from the file menu, and select 'Standard EXE' as your project type. Then use the 'Project / Components...' command to include the file 'ICImagingControl 3.0' into the new project. You will see IC Imaging Control icon appear at the bottom of the toolbox.

image

Creating the Control

Click on the IC Imaging Control icon and draw it on the form. A white rectangle should appear on the form, and the Visual Basic Project window form on the right should display IC Imaging Control's properties.

Selecting a Video Source

In the properties window, click on the Device property. It will display all video sources that are installed on your computer in a combo box. Select the one you wish to use:

image

Selecting an Input Channel

In the project window, click on the InputChannel property. All the inputs that your video device processes, will be displayed. Some devices will display "n/a" as a property value, meaning that you do not need to select an input for this device. If input channels are displayed, select the one you wish to use. Note that the actual values displayed may vary depending on the selected device:

image

Selecting a Video Norm

This setting is only required, if you connect an analog camera via a video-to-1394 converter or frame grabber. Click on the VideoNorm property and select NTSC or PAL, depending on the video norm your camera supports. Again "n/a" is displayed, if there is no video norm to be selected:

image

Selecting a Video Format

The video format determines the video stream's image size and color depth. Select one in the VideoFormat box:

image

Adding Program Code

Now the single line of code mentioned earlier: In the FormLoad event, add this line of code, which will automatically enable the live video display when the program is started.

Private Sub Form_Load()
    ICImagingControl1.LiveStart
End Sub

Running the Program

Finished. You are now ready to hit F5 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