View Single Post
 
Old 07-29-2015, 10:48 AM
VB_Alien VB_Alien is offline
Senior Contributor
 
Join Date: Apr 2004
Posts: 854
Default

I've made a little headway om this but it
still isn't what i'm looking for.

Code:
Private Function TakeImage(ByVal Width As Integer, ByVal Height As Integer) As Bitmap
        Dim Img As New Bitmap(Width, Height)
        Dim g As Graphics = Graphics.FromImage(Img)

        g.CopyFromScreen(Mp1.PointToScreen(Mp1.ClientRectangle.Location), Point.Empty, Mp1.ClientSize)

        g.Dispose()
        Return Img
    End Function
I'm still using CopyFromScreen but i'm also using the points
and location of the media player to get my image from.

Now i get an image of the whole media player control, complete
with button controls but i also get the image in the player.

Also, i have a save file dialog box coming up when i attempt to save
an image, so that i can save it where i want it. After i click the save,
my code saves the image of the save dialog box, instead of the media
player image, unless i first move the save dialog box off to the side
somewhere.

So it looks like my code is not the way to go to get an image
from the media player. Does anyone know of a better way to
capture and save and image from the media player control or
is it even possible?
Reply With Quote