<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to Get a point outside a VB.form in Button Add-ins? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690337#M18540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I have already find some way to get a point. However, they cannot work appropritately. For example, OnMouseDown event is not exist in Button Add-in classes. Furthermore, OnMouseDown Event in VB Forms can only work in side the form. So I sincerely asking for if there is any other way to obtain a point outside the form within Button Add-ins? If it is appropriate, would you like to show me the sample of codes? I will be really appreciate of it.:cool:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Dec 2013 16:56:05 GMT</pubDate>
    <dc:creator>EnzheLu</dc:creator>
    <dc:date>2013-12-07T16:56:05Z</dc:date>
    <item>
      <title>How to Get a point outside a VB.form in Button Add-ins?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690337#M18540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I have already find some way to get a point. However, they cannot work appropritately. For example, OnMouseDown event is not exist in Button Add-in classes. Furthermore, OnMouseDown Event in VB Forms can only work in side the form. So I sincerely asking for if there is any other way to obtain a point outside the form within Button Add-ins? If it is appropriate, would you like to show me the sample of codes? I will be really appreciate of it.:cool:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Dec 2013 16:56:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690337#M18540</guid>
      <dc:creator>EnzheLu</dc:creator>
      <dc:date>2013-12-07T16:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get a point outside a VB.form in Button Add-ins?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690338#M18541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Well, I have already find some way to get a point. However, they cannot work appropritately. For example, OnMouseDown event is not exist in Button Add-in classes. Furthermore, OnMouseDown Event in VB Forms can only work in side the form. So I sincerely asking for if there is any other way to obtain a point outside the form within Button Add-ins? If it is appropriate, would you like to show me the sample of codes? I will be really appreciate of it.:cool:&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;What are you trying to do? It would appear to me that you want to create a tool rather than a button. Buttons should be used where you do not need a constant response from the user i.e. it does one job - opens a dockable window or windows form or runs a script. You can do the same with a tool. However, whilst the tool is switched on Arc will continue to send information on what the user is doing to the tool, hence the OnMouseDown event. In this way you can pass information to a form if you are using one. Personally I have not attempted what you are trying - but a google search did bring this up: &lt;/SPAN&gt;&lt;A href="http://stackoverflow.com/questions/5528543/getting-position-of-mouse-cursor-when-clicked-out-side-the-forms-boundary"&gt;http://stackoverflow.com/questions/5528543/getting-position-of-mouse-cursor-when-clicked-out-side-the-forms-boundary &lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Dec 2013 09:04:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690338#M18541</guid>
      <dc:creator>AlexandraFairbarns</dc:creator>
      <dc:date>2013-12-09T09:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get a point outside a VB.form in Button Add-ins?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690339#M18542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I believe this is what you are trying to do, you will need to reference the appropriate objects in your code as well&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public IPoint getpointclicked(IMxApplication mxapp, ISymbol symbol)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAppDisplay appdisplay = mxapp.Display;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IScreenDisplay screendisplay = appdisplay.FocusScreen as IScreenDisplay;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRubberBand rubberband = new RubberPoint();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGeometry geo = new Point();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Boolean result = rubberband.TrackExisting(screendisplay, symbol, geo);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IPoint point = rubberband.TrackNew(screendisplay, symbol) as IPoint;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return point;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2013 14:47:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690339#M18542</guid>
      <dc:creator>SusanGoddard</dc:creator>
      <dc:date>2013-12-12T14:47:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get a point outside a VB.form in Button Add-ins?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690340#M18543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to interact with the map window you need to be using a &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/Tool_Members/001v0000008w000000/"&gt;Tool AddIn&lt;/A&gt;&lt;SPAN&gt; button not the Button AddIn which does something once you clicked on it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2013 12:15:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690340#M18543</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2013-12-13T12:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to Get a point outside a VB.form in Button Add-ins?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690341#M18544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I believe this is what you are trying to do, you will need to reference the appropriate objects in your code as well&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public IPoint getpointclicked(IMxApplication mxapp, ISymbol symbol)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IAppDisplay appdisplay = mxapp.Display;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IScreenDisplay screendisplay = appdisplay.FocusScreen as IScreenDisplay;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRubberBand rubberband = new RubberPoint();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGeometry geo = new Point();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Boolean result = rubberband.TrackExisting(screendisplay, symbol, geo);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (result)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IPoint point = rubberband.TrackNew(screendisplay, symbol) as IPoint;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return point;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually I just cut the function and replace with another feature in my add-ins. But I think this really would work with my old version add-ins. Thank you. I really appreciate for your help&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Apr 2014 23:36:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-point-outside-a-vb-form-in-button-add/m-p/690341#M18544</guid>
      <dc:creator>EnzheLu</dc:creator>
      <dc:date>2014-04-09T23:36:18Z</dc:date>
    </item>
  </channel>
</rss>

