I am trying to create a screenshot of my geomap object:
Its the worldmap on my form.
![Name: form.jpg
Views: 20
Size: 21.2 KB]()
Whatever I try with sizing the image always turns out like this:
![Name: WorldMap.jpg
Views: 20
Size: 17.7 KB]()
Code:
Private Function CreateScreenshot(ByVal Control As Control) As Bitmap
Dim Screenshot As New Bitmap(Control.Width, Control.Height)
Control.DrawToBitmap(Screenshot, New Rectangle(20, ListBox1.Top, 1100, 800))
Screenshot.Save("WorldMap.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
Return Screenshot
End Function
CreateScreenshot(geoMap1)
Whatever I try with sizing the image always turns out like this: