Question webcam record help

x00x

New member
Joined
Jun 26, 2009
Messages
1
Programming Experience
Beginner
I'm sorry I really don't know where is the most suitable place to put this topic
I'm working on a webcam application using AVICAP class API available in the Windows operating system using vb.net, I'm facing a problem when I am doing limit to the duration of a capture operation by using the fLimitEnabled and wTimeLimit members of the CAPTUREPARMS structure

I wrote this code:

Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim CAP_PRAMS As New CAPTUREPARMS()

SendMessage(hWnd, WM_CAP_GET_SEQUENCE_SETUP, Len(CAP_PRAMS), CAP_PRAMS)

With CAP_PRAMS
CAP_PRAMS.fLimitEnabled = True
CAP_PRAMS.wTimeLimit = 5
End With

SendMessage(hWnd, WM_CAP_SET_SEQUENCE_SETUP, Len(CAP_PRAMS), CAP_PRAMS)

SendMessage(hWnd, WM_CAP_SEQUENCE, 0, 0)

SendMessage(hWnd, WM_CAP_FILE_SAVEAS, 0, _
"C:\Video1.avi")
End Sub

ok, the problem is when I run this code it gives me video file with time recorded 0 sec, it is just an image with avi extention
and I want it to be video file with 5 sec time duration
please tell me where is the problem
thnx in advance
 
Last edited:
Back
Top