Results 1 to 4 of 4

Thread: [RESOLVED] Get Image from PictureBox displaying a vedio file

  1. #1

    Thread Starter
    Addicted Member Programmation's Avatar
    Join Date
    Nov 2009
    Posts
    161

    Resolved [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
    Just Do It!

  2. #2
    PowerPoster boops boops's Avatar
    Join Date
    Nov 2008
    Location
    Holland/France
    Posts
    3,201

    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

  3. #3

    Thread Starter
    Addicted Member Programmation's Avatar
    Join Date
    Nov 2009
    Posts
    161

    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
    Just Do It!

  4. #4

    Thread Starter
    Addicted Member Programmation's Avatar
    Join Date
    Nov 2009
    Posts
    161

    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
    Just Do It!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width