Originally Posted by
.paul.
Working any better?
No change, still the same.
Code:
Private Function CreateScreenshot(ByVal Control As Control) As Bitmap
Dim Screenshot As New Bitmap(1100, 800)
Control.DrawToBitmap(Screenshot, New Rectangle(0, 0, 1100, 800))
Screenshot.Save("WorldMap.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
Return Screenshot
End Function
I can screenshot the whole form with this but its not just the map.
Code:
Dim bounds = Me.Bounds
Using bitmap As New Bitmap(bounds.Width - 15, bounds.Height - 8)
Using g = Graphics.FromImage(bitmap)
g.CopyFromScreen(New Point(bounds.Left + 8, bounds.Top), Point.Empty, bounds.Size)
End Using
bitmap.Save("WorldMap.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
End Using