<?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: Two MapControls in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570294#M15374</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Map Control and the Document have two different maps. I tried the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
m_PlanActiveView = m_pMap 'set the Map of the MapControl
m_PlanActiveView.ShowScrollBars = False 'MapControl ScrollBars are not visible
If ClassGlobal.ActiveView.FocusMap IsNot m_pMap Then 'ClassGlobal.ActiveView is the ActiveView of ArcMap
&amp;nbsp;&amp;nbsp; ClassGlobal.ActiveView.ShowScrollBars = True 'If this line is executed m_PlanActiveView.ShowScrollBars changes to True(!!!)
&amp;nbsp;&amp;nbsp; ClassGlobal.ActiveView.ShowSelection = False 'Test if this problem affects other properties of the MapControl
&amp;nbsp;&amp;nbsp; m_PlanActiveView.ShowSelection = True '.. no, ClassGlobal.ActiveView.ShowSelection stays False while m_PlanActiveView.ShowSelection is True
End If&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe it's a bug in arcobjects?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:32:54 GMT</pubDate>
    <dc:creator>MickeyO_Neil</dc:creator>
    <dc:date>2021-12-12T00:32:54Z</dc:date>
    <item>
      <title>Two MapControls</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570291#M15371</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 have made an extension for ArcMap. In this extention you can open a window(non-modal-window) with a MapControl in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this MapContol the Scrollbars are always deactivated and it is not possible to activate them over the GUI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So, if the window with my MapControl is open and I change the view in ArcMap, from data view to layout view, the Scrollbars in ArcMap disappear. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;During Debug-Mode I found out, that ArcMap uses the MapControl Settings of my window. I can only change them for both.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do i set the Scrollbars for arcmap visible and for my MapContol invisible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mickey&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 05:44:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570291#M15371</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2014-05-22T05:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Two MapControls</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570292#M15372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Without seeing your code I can only guess but it sounds like you've set the map for your map control to the document's map.&amp;nbsp; Something like this:&amp;nbsp; mapControl.Map = document.FocusMap.&amp;nbsp; If so, then the behavior you are seeing is what you should expect to happen.&amp;nbsp; Both ArcMap and your map control are using the same map, so if you change it in any way you should see those changes in both.&amp;nbsp; To prevent this, you need to set your map control to use a copy of the map from the document.&amp;nbsp; You can do this using IObjectCopy.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 13:53:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570292#M15372</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2014-05-22T13:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: Two MapControls</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570293#M15373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, I will have a closer look to my Code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But the MapControls are showing two different Maps from two different MXDs :confused:.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 May 2014 14:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570293#M15373</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2014-05-22T14:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Two MapControls</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570294#M15374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The Map Control and the Document have two different maps. I tried the following code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
m_PlanActiveView = m_pMap 'set the Map of the MapControl
m_PlanActiveView.ShowScrollBars = False 'MapControl ScrollBars are not visible
If ClassGlobal.ActiveView.FocusMap IsNot m_pMap Then 'ClassGlobal.ActiveView is the ActiveView of ArcMap
&amp;nbsp;&amp;nbsp; ClassGlobal.ActiveView.ShowScrollBars = True 'If this line is executed m_PlanActiveView.ShowScrollBars changes to True(!!!)
&amp;nbsp;&amp;nbsp; ClassGlobal.ActiveView.ShowSelection = False 'Test if this problem affects other properties of the MapControl
&amp;nbsp;&amp;nbsp; m_PlanActiveView.ShowSelection = True '.. no, ClassGlobal.ActiveView.ShowSelection stays False while m_PlanActiveView.ShowSelection is True
End If&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe it's a bug in arcobjects?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:32:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570294#M15374</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2021-12-12T00:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: Two MapControls</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570295#M15375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just made a MapControl and set the Property "ShowScrollbars" to False:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]34131[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;No personal Code, just Windows Form-Designer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If I open the Window (non-modal) in ArcMap and switch between Data-View and Layout-View the Scrallbars of ArcMap disappear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why:confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 13:01:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570295#M15375</guid>
      <dc:creator>MickeyO_Neil</dc:creator>
      <dc:date>2014-05-28T13:01:10Z</dc:date>
    </item>
    <item>
      <title>Re: Two MapControls</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570296#M15376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It appears to be a bug.&amp;nbsp; We have an application that uses the map control to display a preview.&amp;nbsp; Even though the map shown in the map control is the map from the document, we create a deep copy of the map object before assigning it to the map control.&amp;nbsp; I usually keep my scroll bars in ArcMap turned off.&amp;nbsp; If I turn them on, switch to layout view then back to data view, the scroll bars remain visible.&amp;nbsp; If I do the same thing with our dialog open, the scroll bars disappear when I return to data view.&amp;nbsp; The map control has its scroll bars turned off.&amp;nbsp; I'm not really sure why ArcMap would be picking up that property setting but it apparently does.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 May 2014 13:42:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/two-mapcontrols/m-p/570296#M15376</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2014-05-28T13:42:10Z</dc:date>
    </item>
  </channel>
</rss>

