# Track Zoom

**URL:** <https://community.thinkgeo.com/t/track-zoom/2158>\
**Category:** WinForms\
**Created:** [January 18, 2013, 2:40pm UTC](https://community.thinkgeo.com/t/track-zoom/2158 "2013-01-18T14:40:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Serena](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Serena](https://community.thinkgeo.com/u/Serena)\
**Post date:** [January 18, 2013, 2:40pm UTC](https://community.thinkgeo.com/t/track-zoom/2158/1 "2013-01-18T14:40:18Z")

</div>

Hello,

I&nbsp;have&nbsp;a&nbsp;tool&nbsp;bar&nbsp;on&nbsp;my&nbsp;map&nbsp;form&nbsp;with&nbsp;Zoom&nbsp;In&nbsp;and&nbsp;Zoom&nbsp;Out&nbsp;buttons.&nbsp;&nbsp;I&nbsp;would&nbsp;like&nbsp;the&nbsp;ZoomIn&nbsp;tool&nbsp;to&nbsp;behave&nbsp;like&nbsp;a&nbsp;track&nbsp;zoom&nbsp;rather&nbsp;than&nbsp;zooming&nbsp;in&nbsp;by&nbsp;percentage.&nbsp;&nbsp;&nbsp;I&nbsp;have&nbsp;searched&nbsp;the&nbsp;samples&nbsp;and&nbsp;can't&nbsp;find&nbsp;an&nbsp;example&nbsp;of&nbsp;how&nbsp;to&nbsp;do&nbsp;this.&nbsp;&nbsp;The&nbsp;Map&nbsp;Suite&nbsp;Explorer&nbsp;application&nbsp;does&nbsp;it&nbsp;quite&nbsp;nicely,&nbsp;but&nbsp;I&nbsp;don't&nbsp;have&nbsp;the&nbsp;source&nbsp;code&nbsp;for&nbsp;that.&nbsp;&nbsp;

Can&nbsp;you&nbsp;suggest&nbsp;a&nbsp;sample&nbsp;to&nbsp;look&nbsp;at?&nbsp;&nbsp;I'm&nbsp;using&nbsp;VB.NET&nbsp;in&nbsp;Visual&nbsp;Studio&nbsp;2010.&nbsp;&nbsp;

Thanks!

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [January 21, 2013, 3:45am UTC](https://community.thinkgeo.com/t/track-zoom/2158/2 "2013-01-21T03:45:13Z")

</div>

Hi&nbsp;Serena,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Have&nbsp;you&nbsp;tried&nbsp;the&nbsp;track&nbsp;zoom&nbsp;with&nbsp;shift&nbsp;key?&nbsp;You&nbsp;can&nbsp;hold&nbsp;the&nbsp;shift&nbsp;key&nbsp;and&nbsp;drag&nbsp;the&nbsp;mouse&nbsp;to&nbsp;acheive&nbsp;this.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;Edgar

---

<div class="post-metadata">

**Author:** ![Serena](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Serena](https://community.thinkgeo.com/u/Serena)\
**Post date:** [January 21, 2013, 3:17pm UTC](https://community.thinkgeo.com/t/track-zoom/2158/3 "2013-01-21T15:17:11Z")

</div>

Yes,&nbsp;the&nbsp;shift&nbsp;key&nbsp;works.&nbsp;&nbsp;But&nbsp;I&nbsp;want&nbsp;to&nbsp;programmatically&nbsp;make&nbsp;my&nbsp;"zoom&nbsp;in"&nbsp;tool&nbsp;work&nbsp;that&nbsp;way.

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [January 21, 2013, 9:29pm UTC](https://community.thinkgeo.com/t/track-zoom/2158/4 "2013-01-21T21:29:55Z")

</div>

I’m&nbsp;wandering&nbsp;if&nbsp;you&nbsp;are&nbsp;using&nbsp;the&nbsp;Desktop&nbsp;Edition&nbsp;or&nbsp;just&nbsp;Map&nbsp;Suite&nbsp;Service&nbsp;Edition(Core)?  
&nbsp;  
If&nbsp;it’s&nbsp;Desktop&nbsp;Edition,&nbsp;I&nbsp;am&nbsp;afraid&nbsp;that&nbsp;would&nbsp;be&nbsp;complex&nbsp;to&nbsp;do&nbsp;that,&nbsp;because&nbsp;we&nbsp;know&nbsp;the&nbsp;Desktop&nbsp;Edition&nbsp;is&nbsp;a&nbsp;control&nbsp;which&nbsp;had&nbsp;been&nbsp;registered&nbsp;many&nbsp;events&nbsp;such&nbsp;as&nbsp;MouseDown,MouseMove,etc.&nbsp;So,&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;do&nbsp;more&nbsp;works&nbsp;in&nbsp;those&nbsp;events,&nbsp;please&nbsp;override&nbsp;the&nbsp;methods.&nbsp;Just&nbsp;let&nbsp;you&nbsp;know,&nbsp;we&nbsp;also&nbsp;have&nbsp;many&nbsp;properties&nbsp;such&nbsp;as&nbsp;“MapLeftClickDragMode”,”&nbsp;MapRightClickDragMode”,”&nbsp;PanMode”,”&nbsp;ZoomPercentage”&nbsp;etc.&nbsp;in&nbsp;InteractiveOverlay&nbsp;class&nbsp;and&nbsp;they&nbsp;can&nbsp;be&nbsp;used&nbsp;like&nbsp;this:&nbsp;winformsMap1.ExtentOverlay.LeftClickDragMode&nbsp;=&nbsp;MapLeftClickDragMode.Disabled;  
Hope&nbsp;those&nbsp;properties&nbsp;can&nbsp;help&nbsp;you&nbsp;in&nbsp;some&nbsp;scenarios.  
&nbsp;  
However,&nbsp;if&nbsp;you&nbsp;are&nbsp;just&nbsp;using&nbsp;Map&nbsp;Suite&nbsp;Service&nbsp;Edition,&nbsp;we&nbsp;can&nbsp;do&nbsp;that&nbsp;just&nbsp;like&nbsp;our&nbsp;MapSuite&nbsp;Explorer&nbsp;does.&nbsp;And&nbsp;I’ve&nbsp;created&nbsp;a&nbsp;sample&nbsp;for&nbsp;you,&nbsp;please&nbsp;get&nbsp;it&nbsp;and&nbsp;have&nbsp;a&nbsp;try,  
&nbsp;  
Hope&nbsp;it&nbsp;helps,  
Edgar  
  
[TrackZoomTool.zip](https://community.thinkgeo.com/uploads/default/original/2X/f/f516cf470d61efcfdd01995da1f8b20cc2136bd7.zip) (102 KB)

---

<div class="post-metadata">

**Author:** ![Serena](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/s/a87d85/32.png) [@Serena](https://community.thinkgeo.com/u/Serena)\
**Post date:** [February 6, 2013, 7:13am UTC](https://community.thinkgeo.com/t/track-zoom/2158/5 "2013-02-06T07:13:52Z")

</div>

I&nbsp;am&nbsp;using&nbsp;Desktop&nbsp;Edition&nbsp;with&nbsp;VB.NET.&nbsp;&nbsp;I&nbsp;found&nbsp;an&nbsp;example&nbsp;in&nbsp;C#&nbsp;and&nbsp;was&nbsp;able&nbsp;to&nbsp;convert&nbsp;the&nbsp;code&nbsp;to&nbsp;VB&nbsp;using&nbsp;the&nbsp;handy&nbsp;web&nbsp;site&nbsp;&nbsp;developerfusion.com/tools/convert/csharp-to-vb/.&nbsp;&nbsp;If&nbsp;anyone&nbsp;else&nbsp;wants&nbsp;this&nbsp;code,&nbsp;let&nbsp;me&nbsp;know&nbsp;and&nbsp;I&nbsp;will&nbsp;post&nbsp;it.

---

<div class="post-metadata">

**Author:** ![Gary2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/g/49beb7/32.png) [@Gary2](https://community.thinkgeo.com/u/Gary2)\
**Post date:** [February 6, 2013, 9:35pm UTC](https://community.thinkgeo.com/t/track-zoom/2158/6 "2013-02-06T21:35:49Z")

</div>

Hello&nbsp;Serena,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;appreciate&nbsp;your&nbsp;sharing&nbsp;and&nbsp;please&nbsp;don’t&nbsp;hesitate&nbsp;to&nbsp;let&nbsp;us&nbsp;know&nbsp;if&nbsp;you&nbsp;have&nbsp;any&nbsp;other&nbsp;questions.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Regards,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Gary
