I have a winform map which may contains Adornment overlays, in memory shapes, Google map layer and GeoTiff Raster Layer, etc. time to time. One of my requirement is to create a tool strip button as “Copy to Clipboard” which copy current entire map into clipboard which can be past in MS Paint or Word applications. Is this possible please be kind enough to guide me throughout the process
Thanks for your post, yes it’s possible to do that. you need set everything you want to copy to a graphic and then use the Clipboard.SetData method to made this.
Any more questions please feel free to let me know.
Thanks for the info. Could you please give me a hint about how to do "Copy to graphic". May be this is not related to thinkgeo. But i do not have any idea on this.
GetBitmap method is added after version 5.0, you can get the latest dll and have another try. And in version 4.5, you can use DrawToBitmap method to do it but maybe the result is not good as GetBitmap.
We have been using the DrawToBitmap since version 3.0. We are waiting to move to version 5 until you have the IsoLine stuff done. But can you explain the difference between the quality of GetBitmap and DrawToBitmap? We have trouble saving the bitmap as .png unless we set a background on the map. And the background, even though defined as white, will display as a very light Cyan. We’ve had this same kind of problem in other GIS tools, too. Is this addressed in GetBitmap?
Probably GetBitmap has the same issue with DrawToBitmap because internally it calls DrawToBitmap. And you know DrawToBitmap is a built-in API in System.Windows.Forms.Control, so we don’t have much possible to fix it.