<p>I'm having some problems integrating MS MapPoint 2009 into my WinForms .Net 2.0 application in C#.  I've added the ActiveX MapPoint control onto a form and have no problems getting it to display a maps and locations; my concern is the time it takes to load a map once it is created.  </p>

<p>The tests on my development machine have shown the average load time to be between 3 and 5 seconds, during which the application is totally locked.  While this isn't totally unacceptable, it's an awfully long time to lose control of the application.  Also, because the GUI thread is locked, I cannot show a loading dialog or something to mask the load time. </p>

<p>The line that hangs is this: (where axMappointControl1 is the MapPoint control)</p>

<pre><code>axMappointControl1.NewMap(MapPoint.GeoMapRegion.geoMapNorthAmerica);
</code></pre>

<p>I've tried executing the NewMap method on another thread but the GUI thread still ends up being blocked.</p>

<p>My questions are: </p>

<ul>
<li>What can I do to speed up MapPoint when it loads?</li>
<li>Is there any way to load MapPoint so that it won't block the GUI thread?</li>
</ul>

<p>Any help is greatly appreciated.</p>

[{'answer_id': 96314, 'author': 'Frosty', 'author_id': 7476, 'author_profile': 'https://Stackoverflow.com/users/7476', 'pm_score': 3, 'selected': True, 'text': '<p>According to <a href="http://www.mapforums.com/load-new-map-separate-thread-keep-ui-responsive-4605.html" rel="nofollow noreferrer">these</a> <a href="http://www.mapforums.com/activex-performance-net-3415.html" rel="nofollow noreferrer">threads</a> at mapforums.com the slowness of ActiveX startup is well known and unavoidable (though the question of threading to help with GUI responsiveness is still open.</p>\n\n<p>One thing suggested was to abandon the ActiveX version in favor of the MapPoint.Application object instead.</p>\n\n<p>Hope that helps.</p>\n'}, {'answer_id': 4594911, 'author': 'winwaed', 'author_id': 481927, 'author_profile': 'https://Stackoverflow.com/users/481927', 'pm_score': 1, 'selected': False, 'text': '<p>Yes the Application version runs on its own thread - so this should be a quicker alternative - easier to do your own stuff whilst it is starting up. However, MapPoint 2010 tends to take a few seconds to start up when started by a user.</p>\n\n<p>I would create a temporary GUI thread and use this to display a splash screen during start up and/or do any thread-safe initialisation that you need to do. </p>\n\n<p>All calls to a MapPoint instance (or ActiveX control) must be from the same thread that create the MapPoint control or application object.</p>\n'}]
['https://Stackoverflow.com/questions/59816', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1314/']