The MapWebcamToWindow sub performs the following tasks
the name of the first available VFW driver.
a capture window, and attaches it to a given window handle.
the VFW driver to the capture window
the refresh rate to 15 frames per second
the transfer of video between the VFW driver and capture window
the video format to 320x240
and stretches the capture window to 320 x 240 pixels
Finally, we provide our CloseWebcam function to perform the
And thatís all there is to it! To test the application, just
plug in your webcam, turn off any other software that could be accessing it,
then run this program. Your webcam video feed should appear on the form