VideoCog .NET QuickStart

This quick start is a step by step tutorial for adding the VideoCog UserControl to a Visual Basic .NET application. The procedure is nearly identical for C# and Managed C++ projects.

The tutorial covers the following five steps, which should take less than ten minutes:

  1. Add the VideoCog Control to the Visual Studio Toolbox
  2. Add the VideoCog Control to Your Application's Form
  3. Set the VideoCog Control's Properties
  4. Handle a Control Event
  5. Run the Application

1. Add the VideoCog Control to the Visual Studio Toolbox

1.1 Create a new Windows Application project In Visual Studio.

1.2 Select "Add/Remove Items..." from the Toolbox context menu:

 

1.3 From the "Customize Toolbox" dialog, select "Browse...":

 

1.4 Select the VideoCog assembly (VideoCog.dll) from the \bin subdirectory of the installation folder and click "Open":

 

1.5 Select OK from the "Customize Toolbox" dialog. The control is now added to your toolbox and ready to use.

 

2. Add the VideoCog Control to Your Application's Form

2.1 Drag the VideoCog control from the Toolbox to your Windows form. This creates a new instance of the VideoCog:

 

The VideoCog is a licensed control. At this point it will look for a license file, which should have been sent to you when you purchased or downloaded a trial version of the product.

 

3. Set the VideoCog Control's Properties

 

3.1 The Visual Studio Properties Window lists the properties for the VideoCog. Properties specific to the VideoCog are grouped under the Category "Video".

 

3.2 Set the source property for the VideoCog to a video file by clicking on the ellipsis button to the right of the Streams property. This launches the "Collection Editor" dialog, which is a standard editor for all VS.NET properties of type list.

 

3.3 Select the ellipsis button for the Source property from the VideoCogStream Collection Editor dialog:

 

3.4 From the Video Stream Source Selection dialog box, click on the ellipsis buton to browse for a video file. The Video Stream Source Selection dialog is part of the VideoCog, and can be used to select video files (ellipsis...) or live video sources (dropdown):

 

4. Handle a Control Event

 

4.1 Add a MouseDown event handler for the VideoCog control. For example, the following code plays back the video file when the mouse clicks on the VideoCog control:

Private Sub VideoCogControl1_MouseDown(ByVal sender As Object,
            ByVal e As MouseEventArgs) Handles VideoCogControl1.MouseDown
     
     VideoCogControl1.Rewind()
     VideoCogControl1.Play()


End Sub
                

5. Run the Application

 

5.1 Build and run the application (F5 key):

 

 

Copyright © 2006 Cogitance LLC. All rights reserved.