Alright, thanks to Milton Miranda Neto, for his code. At last i did suceed in c# using this extension. You can watch this http://youtu.be/-V0xiyQcYaM video for more help.
Hi,
Can you please update on how exactly should I use this control. I created a local Image type property & changed the control type to this control.
When I start the cam & click on get Image nothing happens.
Am I missing something here?
Kindly let me know if there is something that needs to be done in order to hook the image to an existing User profile.
Regards
Supreet
Hi, did you watch the video on the extension's home page? :-)
You must not replace the Image type control, leave it unchanged. Simply add a new custom control and change this to use the extension. The control returns an image that can be assigned to the Image type.
All the best.
Hi,
if I use the control within a modalwindow, and closing it without clicking [Stop] and open it again and click the [Start] I get an error saying that the webcam is being used already. how can I solve this problem?
I create the solution.
' ---------- ModalWindow webcam ----------
Private WithEvents WebCam As WebcamControl
Private Sub Funcionarios_Created()
Dim Ctrl = Me.FindControl("ScreenContent")
AddHandler Ctrl.ControlAvailable, Sub(sender As Object, e As ControlAvailableEventArgs)
Me.WebCam = CType(e.Control, WebcamControl)
End Sub
End Sub
Private Sub WebCam_CaptureCompleted() Handles WebCam.CaptureCompleted
Me.Funcionarios1.SelectedItem.Foto = Me.WebCam.CapturedImage
End Sub
Private Sub CarregarFotoDaWebCam_Execute()
Dim Ctrl = Me.FindControl("WebCamModalWindow")
AddHandler Ctrl.ControlAvailable, Sub(sender As Object, e As ControlAvailableEventArgs)
Dim Cw As ChildWindow = CType(e.Control, ChildWindow)
AddHandler Cw.Closing, Sub(sender2 As Object, e2 As EventArgs)
Me.WebCam.capSource.Stop()
End Sub
End Sub
Me.OpenModalWindow("WebCamModalWindow")
End Sub
Private Sub FotoOK_Execute()
Me.CloseModalWindow("WebCamModalWindow")
End Sub