[Gambas-user] MediaPlayer
Mike Crean
mike.crean at y7mail.com
Sun Nov 15 09:06:48 CET 2020
Hi all, I know I amprobably missing a simple fix for my problem.
I have a picture boxon a form and I wish to display a webcam in it.
When I try with thefollowing code the web cam image floods the entire form
can anyone point mein the write direction so it is contained in the picture box please.
Best regards
Mike
Private mp As NewMediaPlayer
Public SubForm_Open()
Form.Load
Form.Show
PictureBox1.SetFocus()
mp.URL ="v4l2:///dev/video0"
mp.SetWindow(PictureBox1)
mp.Play()
End
Public SubForm_Close()
EndIt()
End
Public Sub EndIt()
Try Quit
End
Public SubButton2_Click()
Dim theImage AsImage = mp.Video.Image
theImage.Save(Application.Path &/ Format(Now, "ddmmyyyy_hhnnss")& ".jpg")
PictureBox1.Image= theImage
End
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20201115/ead29765/attachment.htm>
More information about the User
mailing list