Capture an Image from Live Video with the Microsoft Video Control
by Guthrie Cooper |
-
This only works on Windows XP. (Home/Professional)
-
Start a new Visual Basic project and add the Microsoft Tuner 1.0 Type Library
to your references.
-
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.
-
Give the control a name, like VidControl.
-
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
/////////////////////////////////////////////////////////////////////
-
Run the application.
-
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. |
|
|