.NET Logo
Welcome Guest Search | Active Topics | Members | Log In | Register

รบกวนช่วยดู code webcam ที่ครับ Options · View
koroman
Posted: Wednesday, July 23, 2008 11:19:12 AM

Rank: มือสมัครเล่น
Groups: Member

Joined: 7/7/2008
Posts: 14
Option Explicit

Const ws_visible = &H10000000
Const ws_child = &H40000000
Const WM_USER = 1024
Const WM_CAP_EDIT_COPY = WM_USER + 30
Const wm_cap_driver_connect = WM_USER + 10
Const wm_cap_set_preview = WM_USER + 50
Const wm_cap_set_overlay = WM_USER + 51
Const WM_CAP_SET_PREVIEWRATE = WM_USER + 52
Const WM_CAP_SEQUENCE = WM_USER + 62
Const WM_CAP_SINGLE_FRAME_OPEN = WM_USER + 70
Const WM_CAP_SINGLE_FRAME_CLOSE = WM_USER + 71
Const WM_CAP_SINGLE_FRAME = WM_USER + 72
Const DRV_USER = &H4000
Const DVM_DIALOG = DRV_USER + 100
Const PREVIEWRATE = 30

Private Declare Function SendMessage Lib "user32" _
    Alias "SendMessageA" (ByVal hWnd As Long, _
                ByVal wMsg As Long, _
                ByVal wParam As Long, _
                ByVal lParam As Long) As Long
Private Declare Function capCreateCaptureWindow Lib "avicap32.dll" _
    Alias "capCreateCaptureWindowA" (ByVal a As String, _
                ByVal b As Long, _
                ByVal c As Integer, _
                ByVal d As Integer, _
                ByVal e As Integer, _
                ByVal f As Integer, _
                ByVal g As Long, _
                ByVal h As Integer) As Long

Dim hwndc As Long
Dim saveflag As Integer
Dim pictureindex As Integer
Dim filter1(-1 To 1, -1 To 1) As Single
Dim filter2(-1 To 1, -1 To 1) As Single
Dim temp As String

Private Sub Command1_Click()
   Unload Me
End Sub

Private Sub Form_Load()
On Error GoTo handler:
   hwndc = capCreateCaptureWindow("CaptureWindow", _
                                ws_child Or ws_visible, _
                                0, _
                                0, _
                                Picture1.Width, _
                                Picture1.Height, _
                                Picture1.hWnd, _
                                0)
   If (hwndc <> 0) Then
       temp = SendMessage(hwndc, wm_cap_driver_connect, 0, 0)
       temp = SendMessage(hwndc, wm_cap_set_preview, 1, 0)
       temp = SendMessage(hwndc, WM_CAP_SET_PREVIEWRATE, PREVIEWRATE, 0)

       temp = SendMessage(Me.hWnd, WM_CAP_EDIT_COPY, 1, 0)
       Picture1.Picture = Clipboard.GetData
   Else
       MsgBox "Unable to capture video.", vbCritical
   End If
Exit Sub
handler:
End
End Sub

คือ อยากได้ cmd ปิดกล้องอ่า ครับ ช่วยด้วยครับ คุณ เป้(coppy เค้ามาครับ)
รบกวนทีครับ
koroman
Posted: Wednesday, July 23, 2008 11:22:08 AM

Rank: มือสมัครเล่น
Groups: Member

Joined: 7/7/2008
Posts: 14

อยากจะขออีกอย่างครับช่วยอธิบาย โค้ดที่ให้มาด้วยครับ จะเป็นพระคุณอย่างยิ่งครับ

ถ้าอธิบาย ก็ ขอบคุณครับ

แต่ถ้าลำบากพี่ๆผู้รู้ ก็ไม่เป็นไรครับ ครับคุณครับ

ngo_somc
Posted: Tuesday, July 29, 2008 3:22:51 PM
Rank: มือฝึกหัด
Groups: Member

Joined: 7/7/2008
Posts: 9
Location: Thai

ผมมี code ที่ใช้งานได้นะครับ

ถ้าจะเอาก็ส่งเมลล์มาครับ  จะส่งให้

 

koroman
Posted: Wednesday, July 30, 2008 9:45:21 AM

Rank: มือสมัครเล่น
Groups: Member

Joined: 7/7/2008
Posts: 14

jacksaparro@hotmail.com ขอบคุณครับ

mrxc
Posted: Wednesday, July 30, 2008 11:48:00 AM
Rank: มือเทพ
Groups: Member

Joined: 3/6/2008
Posts: 196
Location: TH

mrxc@live.com ขอดูหน่อยครับ อาจจะได้ใช้งานในอนาคต

 

ขอบคุณครับ

natdanai4
Posted: Wednesday, July 30, 2008 1:56:52 PM

Rank: มือสมัครเล่น
Groups: Member

Joined: 7/7/2008
Posts: 10
Location: bangkok
ขอดูหน้าตาหน่อยได้ไหมค่ะ
koroman
Posted: Monday, August 04, 2008 9:22:49 AM

Rank: มือสมัครเล่น
Groups: Member

Joined: 7/7/2008
Posts: 14

ครับ เดี๋ยวจะเอาหน้า form มาให้ดูครับ พอดี HD เจ๊ง T-T.....

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.


Sponsored by