<?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: Disable the Data Frame Context menu when you right-click on a map in ArcMap in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/disable-the-data-frame-context-menu-when-you-right/m-p/94035#M2507</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!&amp;nbsp; That worked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jul 2013 03:22:02 GMT</pubDate>
    <dc:creator>IanKramer</dc:creator>
    <dc:date>2013-07-04T03:22:02Z</dc:date>
    <item>
      <title>Disable the Data Frame Context menu when you right-click on a map in ArcMap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/disable-the-data-frame-context-menu-when-you-right/m-p/94033#M2505</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;SPAN&gt;I have written a tool in my editor extension add-in that allows the user to select a feature from one layer with a left click and then select another feature with a right click, which then performs some analysis.&amp;nbsp; However, when the user right-clicks, I get the Data Frame Context menu, which I want to disable.&amp;nbsp; Does anybody know how to disable or suppress this popup menu from appearing on a right-click?&amp;nbsp; My code is executed on the MouseDown event and I don't have any code in the MouseUp event for the tool.&amp;nbsp; I have found the UID for the Data Frame Context Menu, but I have not seen any methods or properties that allow me to disable it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ian&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 18:34:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/disable-the-data-frame-context-menu-when-you-right/m-p/94033#M2505</guid>
      <dc:creator>IanKramer</dc:creator>
      <dc:date>2013-07-03T18:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the Data Frame Context menu when you right-click on a map in ArcMap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/disable-the-data-frame-context-menu-when-you-right/m-p/94034#M2506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ian,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In your add-in tool you can suppress the context menu by overriding the call to OnContextMenu and returning 'true'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp; public class Tool1 : ESRI.ArcGIS.Desktop.AddIns.Tool &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; protected override bool OnContextMenu(int x, int y) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //return base.OnContextMenu(x, y); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; protected override void OnMouseDown(MouseEventArgs arg) &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Diagnostics.Debug.WriteLine(arg.Button.ToString());&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; protected override void OnUpdate() &amp;nbsp;&amp;nbsp;&amp;nbsp; { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Enabled = ArcMap.Application != null; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 21:43:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/disable-the-data-frame-context-menu-when-you-right/m-p/94034#M2506</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-03T21:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Disable the Data Frame Context menu when you right-click on a map in ArcMap</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/disable-the-data-frame-context-menu-when-you-right/m-p/94035#M2507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you!&amp;nbsp; That worked.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 03:22:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/disable-the-data-frame-context-menu-when-you-right/m-p/94035#M2507</guid>
      <dc:creator>IanKramer</dc:creator>
      <dc:date>2013-07-04T03:22:02Z</dc:date>
    </item>
  </channel>
</rss>

