[RESOLVED] Get Image from PictureBox displaying a vedio file
Hello every body
Im using Microsoft.DirectX.AudioVideoPlayback.dll to display a video in a picturebox using the following code:
Code:
Dim V As New Microsoft.DirectX.AudioVideoPlayback.Video(Application.StartupPath & "\MyMovie.WMV")
V.Owner = PictureBox1
V.Play()
So far every thing is okay. and the video is really displaing in the picturebox1 but when i try to set the PictureBox1 Image to another PictureBox Like that:
PictureBox2.Image = PictureBox1.Image
Nothing happend, I had checked the PictureBox1 Image value i found it = nothing.
All what i need is getting a capture from the picturebox while vedio playing.
Any Idea please?
Thanks for all
Re: Get Image from PictureBox displaying a vedio file
You haven't set the Image property so there is nothing to copy that way. But screen grabbing methods are worth trying. For example, how about this:
Code:
Dim bmp As New Bitmap(PictureBox1.Width, PictureBox1.Height)
Using g As Graphics = Graphics.FromImage(bmp)
g.CopyFromScreen(PictureBox1.PointToScreen(Point.Empty), Point.Empty, bmp.Size)
End Using
PictureBox2.Image = bmp
If that doesn't work, check this forum's code bank for other screen capture methods.
BB
Re: Get Image from PictureBox displaying a vedio file
Wonderfull... Let me kiss your head man. Thanks so so much. (reputation done)
Problem has resolved.
Thanks boops boops :)
Re: Get Image from PictureBox displaying a vedio file
Wonderfull... Let me kiss your head man. Thanks so so much. (reputation done)
Problem has resolved.
Thanks boops boops :)