<?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 Re: How to implement OnMouseClick Event in ArcMap AddIn C# in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421239#M11356</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hey, thanks for your answer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I have a question to this to understand anything right:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when ist the on mouse down event called? everytime when going down or just after clicking the tool's button? does ist also activate after using an other function or will it then be disabled until the tool's button is first clicked again to activate the on mouse down event?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2011 14:07:38 GMT</pubDate>
    <dc:creator>SebastianKrings</dc:creator>
    <dc:date>2011-07-18T14:07:38Z</dc:date>
    <item>
      <title>How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421237#M11354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just want to implement a onMouseClick event. When the specific Add-In is clicked, I want to change the mouseCurser and the user shall click again but now on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The coordinates of the click on the map are which I want to read and work with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found the mapcontrol where I may can change the curser, but didnt find the event handling.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 13:24:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421237#M11354</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2011-07-18T13:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421238#M11355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Make sure your add-in contains a 'tool' (not a button). You can set the tool's cursor, this is used when the pointer is over the map. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There's no Click event, but you can override OnMouseDown and OnMouseUp instead.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;public class Tool1 : ESRI.ArcGIS.Desktop.AddIns.Tool&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; public Tool1()&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;&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; this.Cursor = Cursors.SizeAll;&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;&amp;nbsp;&amp;nbsp; protected override void OnMouseUp(MouseEventArgs arg)&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;&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; base.OnMouseUp(arg);&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine(arg.X + " " + arg.Y);&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; }
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421238#M11355</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2021-12-11T19:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421239#M11356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hey, thanks for your answer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I have a question to this to understand anything right:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;when ist the on mouse down event called? everytime when going down or just after clicking the tool's button? does ist also activate after using an other function or will it then be disabled until the tool's button is first clicked again to activate the on mouse down event?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 14:07:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421239#M11356</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2011-07-18T14:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421240#M11357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The MouseDown event is called when a user presses the mouse on the mapcontrol, not when you click the toolbutton (in that case, OnActivate is called). The events will be called until another tool is selected. The tool can of course deactive itself by setting the Application's CurrentTool to something else.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 05:57:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421240#M11357</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2011-07-19T05:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421241#M11358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;hey&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so could it be possible that more than one tool overrides the onmousedown event and every time when i click on the map control (without clickin one of the tools before) every on mouse down event which has overridden is called?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;because of that i have to query the activation status of every overridden onmousedown, havnt i?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so maybe make a if statement if(this.isActivated()){...}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and on elseway do nothing, i'm right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 07:32:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421241#M11358</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2011-07-20T07:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421242#M11359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, only one single tool can be active at a time, and that is the tool that receives mouse messages.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 08:01:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421242#M11359</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2011-07-20T08:01:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421243#M11360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;ah ok&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but how does arc map know which tool's onmouse down to call when havin two or more tools?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 08:07:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421243#M11360</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2011-07-20T08:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421244#M11361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Because &lt;/SPAN&gt;&lt;STRONG&gt;only one &lt;/STRONG&gt;&lt;SPAN&gt;tool can be active at a time. When you select a tool, say: Zoom In, the previously selected tool will be deactivated. Even if you have more than one tool, &lt;/SPAN&gt;&lt;STRONG&gt;only one &lt;/STRONG&gt;&lt;SPAN&gt;can be active.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The active tool can be determined by IApplication.CurrentTool&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 09:11:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421244#M11361</guid>
      <dc:creator>BerendVeldkamp</dc:creator>
      <dc:date>2011-07-20T09:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement OnMouseClick Event in ArcMap AddIn C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421245#M11362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;aaah the puzzle is fitting&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and currentTool is always set when i click on a tool-button because the method on activate is called and onactivate is the equivalent to onclick of buttons, isnt it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i think that was what i meant in my second post &lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;or just after clicking the tool's button?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if that's all correct i think it shall work now&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thank you very much&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 09:27:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-implement-onmouseclick-event-in-arcmap/m-p/421245#M11362</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2011-07-20T09:27:19Z</dc:date>
    </item>
  </channel>
</rss>

