Check out this thread708-428674. The person there was capturing frames from an AVI. The code I posted should help you capture the picture you are seeking.
Hi, Thank you very much. I'll check it out.
But I have the problem, that the webcam that plug to the server is several, such cam1, cam2, cam3. so I thought the solution that we make ip address on the cam. Can u help me, pls.......
Well if you are displaying what the camera sees on the screen then the code I pointed you to will take a handle to a window and capture just that part.
Ok, here is a simple capture of a picture box playing an avi with the use of a MMC (Microsoft Multimedia Control). What you need to do is... take the code in the other thread708-428674 and place it in a module of a new project. Add a command button (Command1) a picture box (Picture1) and a Microsoft Multimedia Control (MMControl1) to form1 and cut and paste the following code into form1...
[tt]
Option Explicit
Dim Cnt As Integer
Dim BasePath As String
Private Sub Form_Load()
BasePath = "Enter your path here"
End Sub
Private Sub Command1_Click()
MMControl1.Notify = True
MMControl1.Wait = True
MMControl1.Shareable = False
MMControl1.DeviceType = "AVIVideo"
MMControl1.FileName = "C:\Program Files\Microsoft Visual Studio\Common\Graphics\Videos\FileCopy.avi"
'or where ever you have an avi
MMControl1.hWndDisplay = Picture1.hWnd
MMControl1.Command = "Open"
MMControl1.Command = "Step"
MMControl1.Frames = 1
End Sub
Private Sub MMControl1_Done(NotifyCode As Integer)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.