Taking snapshot of video from a form in access

D

David

I would like to use the wia.VideoPreview activex control in a form. When the
camera is connected, I can see video in the control. What I need help with
is taking a snapshot of this video. Can anyone help me with this or point me
in the direction of a tutorial. I have not been able to find anything on the
web.

Thank You
 
E

ErezM via AccessMonster.com

hello david
i hope you meant taking a still-image, for that use

Dim myDevice As WIA.Device
Dim item As WIA.item
Dim imfile As WIA.imagefile
Dim tempFile As String

tempFile = CurrentProject.Path & "\temp.jpg"
Set myDevice = VideoPreview1.Device
Set item = myDevice.ExecuteCommand(wiaCommandTakePicture)
Set imfile = item.Transfer
If Dir(tempFile) <> "" Then Kill (tempFile)
imfile.SaveFile tempFile
img.Picture = tempFile

tell me if something isnt clear
Erez
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top