View Cart | My Account
Imaging Hardware   Search site for:
PRODUCTS
 By:
R & D
Cards Accepted
 

Tutorial

Capture an Image from Live Video with the Microsoft Video Control

by Guthrie Cooper
  1. This only works on Windows XP. (Home/Professional)
  2. Start a new Visual Basic project and add the Microsoft Tuner 1.0 Type Library to your references.
  3. On the components bar, add MS Video control. Click on the new control (It looks a TV) and drag and stretch it on the form.
  4. Give the control a name, like VidControl.
  5. Copy and paste the following code into the Form_Load statement.
    //////////////////////////////////////////////////////////////////////
    Dim objTSContainer As New SystemTuningSpaces
    Dim objTuneRequest As IChannelTuneRequest

    Set objTuneRequest = objTSContainer("Cable").CreateTuneRequest
    objTuneRequest.Channel = 6 'Sets the tuner to channel 6

    VidControl.View objTuneRequest
    VidControl.Run
    /////////////////////////////////////////////////////////////////////
  6. Run the application.
  7. You should see snow or video if you have/don't have something on Channel 6.
Did you like this article or would you like to see another on a related topic? Please let us know.