Results 1 to 4 of 4

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

  1. #1
    Addicted Member Programmation's Avatar
    Join Date
    Nov 09
    Posts
    158

    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
    :: The Best Greeting For You Mr.John George Kemeny ::
    _________________
    ::: Programming Need Only Some of The Logical Thought :::
    :: Programmation ::
    : Egypt :

    ::Sorry .... My English Is Not Clear!::

  2. #2
    Frenzied Member boops boops's Avatar
    Join Date
    Nov 08
    Location
    Holland/France
    Posts
    1,975

    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
    Addicted Member Programmation's Avatar
    Join Date
    Nov 09
    Posts
    158

    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
    :: The Best Greeting For You Mr.John George Kemeny ::
    _________________
    ::: Programming Need Only Some of The Logical Thought :::
    :: Programmation ::
    : Egypt :

    ::Sorry .... My English Is Not Clear!::

  4. #4
    Addicted Member Programmation's Avatar
    Join Date
    Nov 09
    Posts
    158

    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
    :: The Best Greeting For You Mr.John George Kemeny ::
    _________________
    ::: Programming Need Only Some of The Logical Thought :::
    :: Programmation ::
    : Egypt :

    ::Sorry .... My English Is Not Clear!::

Posting Permissions

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