I have the following issue,
I need to take a picture from a control and save it as BMP.
As you can see in the image attached, you can see that I have a windows form with some sort of controls. I need to take the picture from the chart.
Then, the picture I took must be shown in the upper right panel.
In advance, many thanks :D
PS: As you can see, I'm not being able to capture the exact area.
PS2: Attaching Code :D
Private Function CapturarPintura() As Bitmap
Dim bm As Bitmap
Dim gr As Graphics = Me.CreateGraphics
Dim fSize As Size = Me.GB_Grafico.Size
bm = New Bitmap(Me.GB_Grafico.Width, Me.GB_Grafico.Height, gr)
Dim gr2 As Graphics = Graphics.FromImage(bm)
Dim pt As New System.Drawing.Point
pt = Me.GB_Grafico.Location
gr2.CopyFromScreen(Me.Location.X + pt.X, Me.Location.Y + pt.Y, 0, 0, fSize)