اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

تسجيل فيديو والتقاط صوره من خلال كاميرا ويب


UserUser2

الردود الموصى بها

لعدم توافر كاميرا ويب حالياً لم أقم بتجربة الكود التالي ، ولكن جربه وإن شاء الله يفيدك

 

Sub CaptureWebcamImage()
    Dim wia As Object
    Dim webcam As Object
    Dim imageFile As Object

    Set wia = CreateObject("WIA.CommonDialog")

    Set webcam = wia.ShowSelectDevice(WIA.WiaDeviceTypeCameraDevice)
    
    If Not webcam Is Nothing Then

        Set imageFile = webcam.TakePicture()

        imageFile.SaveFile "C:\Path\To\Save\captured_image.jpg"

        Set imageFile = Nothing
    Else
        MsgBox "لم يتم اختيار كاميرا ويب.", vbExclamation
    End If

    Set webcam = Nothing
    Set wia = Nothing
End Sub

 

رابط هذا التعليق
شارك

2 ساعات مضت, Foksh said:

لعدم توافر كاميرا ويب حالياً لم أقم بتجربة الكود التالي ، ولكن جربه وإن شاء الله يفيدك

 

Sub CaptureWebcamImage()
    Dim wia As Object
    Dim webcam As Object
    Dim imageFile As Object

    Set wia = CreateObject("WIA.CommonDialog")

    Set webcam = wia.ShowSelectDevice(WIA.WiaDeviceTypeCameraDevice)
    
    If Not webcam Is Nothing Then

        Set imageFile = webcam.TakePicture()

        imageFile.SaveFile "C:\Path\To\Save\captured_image.jpg"

        Set imageFile = Nothing
    Else
        MsgBox "لم يتم اختيار كاميرا ويب.", vbExclamation
    End If

    Set webcam = Nothing
    Set wia = Nothing
End Sub

 

من فضلك لو امكن مثال 

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information