Controlling Webcam

  • Thread starter Thread starter Pat Mac
  • Start date Start date
P

Pat Mac

Hopefully this is a good group to ask this question. I'm trying to
programmatically control a micro innovations IC50C webcam with VB.NET.
Specifically I'm using the Kodak scanner control. My problem is, despite
setting the control's ShowSetupBeforeScan property to false, when I execute
the StartScan method, I get a dialog box with several setup options and a
"Snapshot" button which I have to push to get an actual snapshot. I want
this to be fully automated without the need to stop and click a dialog
button obviously.

My questions:

1) Is the Kodak Scanner control the appropriate control to be using?
2) Are there any other ways to do this?
3) Is this an issue specific to my webcam's drivers that it won't let me
automate the picture taking?

Here's my code in case anyone is wondering ......

scanCtrl.FileType = ScanLibCtl.FileTypeConstants.JPG_File

scanCtrl.PageOption = ScanLibCtl.PageOptionConstants.OverwriteAllPages

scanCtrl.ScanTo = ScanLibCtl.ScanToConstants.FileOnly

If scanCtrl.ScannerAvailable Then

Try

scanCtrl.Image = "c:\webcam.jpg"

scanCtrl.MultiPage = True

scanCtrl.ShowSetupBeforeScan = False

scanCtrl.OpenScanner()

scanCtrl.Zoom = 100

scanCtrl.StartScan()

Catch ex As Exception

MsgBox("Error scanning:" + vbCrLf + ex.Message,
MsgBoxStyle.Information + MsgBoxStyle.OKOnly, "Error")

End Try

End If
 
Back
Top