Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

multiple camera interfacing in vb6

Status
Not open for further replies.

xanseviera

Junior Member level 3
Joined
Jun 22, 2010
Messages
27
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,434
Hi everyone... im doing camera interfacing with vb6.
this code is for 1 camera setting in VB.. i would like to add few more camera setting...
means, i window in vb can show multiple picture from different camera.
can someone help me?

Code:
Private Sub cmdSettings_Click()
   Call SendMessage(hCap, WM_CAP_DLG_VIDEOFORMAT, 0&, 0&)
   PicWebCam.BackColor = &HE0E0E0
End Sub

Private Sub cmdGetPicture_Click()
   On Error GoTo ErrHandler
       
   Dim sFileName As String
   Call SendMessage(hCap, WM_CAP_SET_PREVIEW, CLng(False), 0&)
   sFileName = App.Path & "\pic.jpg"
   Call SendMessage(hCap, WM_CAP_FILE_SAVEDIB, 0&, ByVal CStr(sFileName))
DoFinally:
   Call SendMessage(hCap, WM_CAP_SET_PREVIEW, CLng(True), 0&)
   Unload Me
   Exit Sub
ErrHandler:
   If Err.Number <> 32755 Then
       MsgBox Err.Description
   End If
   Resume DoFinally
End Sub

Private Sub cmdSource_Click()
   Call SendMessage(hCap, WM_CAP_DLG_VIDEOSOURCE, 0&, 0&)
End Sub

Private Sub Form_Load()
   hCap = capCreateCaptureWindow("Take a Camera Shot", WS_CHILD Or WS_VISIBLE, 0, 0, PicWebCam.Width, PicWebCam.Height, PicWebCam.hWnd, 0)
   If hCap <> 0 Then
       Call SendMessage(hCap, WM_CAP_DRIVER_CONNECT, 0, 0)
       Call SendMessage(hCap, WM_CAP_SET_PREVIEWRATE, 66, 0&)
       Call SendMessage(hCap, WM_CAP_SET_PREVIEW, CLng(True), 0&)
   End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
   On Error Resume Next
   Call SendMessage(hCap, WM_CAP_DRIVER_DISCONNECT, 0, 0)
   If hCap <> 0 Then DestroyWindow (hCap)
   Set frmCapPic = Nothing
End Sub

Private Sub PicWebCam_Click()

End Sub

Screenshot of camera interfacing is been attached below.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top