# winformsMap.GetBitmap() method missing?

**URL:** <https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213>\
**Category:** WinForms\
**Created:** [February 4, 2009, 3:04pm UTC](https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213 "2009-02-04T15:04:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lam](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@lam](https://community.thinkgeo.com/u/lam)\
**Post date:** [February 4, 2009, 3:04pm UTC](https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213/1 "2009-02-04T15:04:50Z")

</div>

I&nbsp;am&nbsp;evaluating&nbsp;3.0&nbsp;beta.&nbsp;I&nbsp;was&nbsp;told&nbsp;I&nbsp;could&nbsp;convert&nbsp;maps&nbsp;to&nbsp;web&nbsp;graphics&nbsp;(gif,&nbsp;png,&nbsp;jpg)&nbsp;using&nbsp;a&nbsp;method&nbsp;called&nbsp;GetBitmap.&nbsp;However,&nbsp;I&nbsp;can&nbsp;not&nbsp;find&nbsp;that&nbsp;method.&nbsp;What&nbsp;am&nbsp;I&nbsp;missing&nbsp;here?

---

<div class="post-metadata">

**Author:** ![michael2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/3e96dc/32.png) [@michael2](https://community.thinkgeo.com/u/michael2)\
**Post date:** [February 4, 2009, 3:31pm UTC](https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213/2 "2009-02-04T15:31:15Z")

</div>

I&nbsp;just&nbsp;had&nbsp;a&nbsp;quick&nbsp;play,&nbsp;this&nbsp;seems&nbsp;to&nbsp;work,&nbsp;you&nbsp;can&nbsp;save&nbsp;it&nbsp;to&nbsp;anything&nbsp;the&nbsp;.NET&nbsp;framework&nbsp;supports&nbsp;in&nbsp;it's&nbsp;ImageFormat.

`        Dim theBitmap As New Bitmap(Map.Bounds.Width, Map.Bounds.Height)        Map.DrawToBitmap(theBitmap, Map.Bounds)        theBitmap.Save("c:\test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)`

---

<div class="post-metadata">

**Author:** ![lam](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@lam](https://community.thinkgeo.com/u/lam)\
**Post date:** [February 4, 2009, 3:42pm UTC](https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213/3 "2009-02-04T15:42:18Z")

</div>

Thanks&nbsp;Michael

---

<div class="post-metadata">

**Author:** ![lam](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/6bbea6/32.png) [@lam](https://community.thinkgeo.com/u/lam)\
**Post date:** [February 4, 2009, 3:53pm UTC](https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213/4 "2009-02-04T15:53:59Z")

</div>

Just&nbsp;made&nbsp;the&nbsp;C#&nbsp;version:

&nbsp;

`Bitmap bitmap = new Bitmap(winformsMap1.Bounds.Width, winformsMap1.Bounds.Height);winformsMap1.DrawToBitmap(bitmap, winformsMap1.Bounds);bitmap.Save(@"c:\test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);`

---

<div class="post-metadata">

**Author:** ![michael2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/3e96dc/32.png) [@michael2](https://community.thinkgeo.com/u/michael2)\
**Post date:** [February 4, 2009, 3:56pm UTC](https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213/5 "2009-02-04T15:56:27Z")

</div>

glad&nbsp;I&nbsp;could&nbsp;help,&nbsp;  
&nbsp;&nbsp;  
&nbsp;have&nbsp;a&nbsp;good&nbsp;one

---

<div class="post-metadata">

**Author:** ![Ben](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ben/32/25720_2.png) [@Ben](https://community.thinkgeo.com/u/Ben)\
**Post date:** [February 5, 2009, 2:37am UTC](https://community.thinkgeo.com/t/winformsmap-getbitmap-method-missing/213/6 "2009-02-05T02:37:59Z")

</div>

Michael&nbsp;and&nbsp;Lars,&nbsp;Thanks&nbsp;for&nbsp;sharing!
