Hello,
How can I find out from within a C# program whether MapPoint is installed or not?
Bye,
MD2000
This is a discussion on C#: How to find out if MapPoint is installed? within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello, How can I find out from within a C# program whether MapPoint is installed or not? Bye, MD2000...
Hello,
How can I find out from within a C# program whether MapPoint is installed or not?
Bye,
MD2000
Hi,
Something like this:
Code:public Main() { InitializeComponent(); try { MP.NewMap(GeoMapRegion.geoMapEurope); } catch (Exception e) { MessageBox.Show("Mappoint not installed or incorrect version"); //Application.Exit(); does not work at this point Win32.PostMessage(Handle, WM_QUIT, 0, 0); } }
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
thank you!
I'll test it.
Bye,
MD
I have tried something similar in my code:
catch (Exception e)
{
MessageBox.Show("Error loading Mappoint: " + e.Message+". Are you sure it is installed?");
}
However this line generates:
"AccessViolationException was unhandled"
"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Any suggestions?
(I have been testing different ways to have mappoint corrupted/not installed, in this case I renamed "MapPoint.exe", to "asdf.exe" which correctly generates a FileNotFoundException)
Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)