Using mappoint automation in .NET without GUI

tsay
05-31-2007, 07:46 AM
Hey all,

I need the Mappoint automation to calculate a few routes using .NET. Everything works fine, however only when I actually display the form that contains the Mappoint automation. The fact is that I need to create a DLL to be used with an Navision Application Server. A Navision Application Server doesn't allow a GUI interface so it crashes if I show the form. There's no solution here, a NAS cannot work with GUI, period.

So my question to you guys, is it possible to use the Mappoint automation without actually displaying the form?

Tnx for the help/suggestions.

rgds,
tsay

tsay
05-31-2007, 08:56 AM
GOT IT!

You have to actually drag & drop the control from the toolbox to your form and then use that variable instead of creating your own in code...

I put the initialize code in the public sub new of the form and in my class I just create a new instance of the form, but never call the show method. This is exactly what I had done before, but instead I had created my own Mappoint control in the public sub new...

Wilfried
06-02-2007, 04:26 AM
Hi,

Thanks for feedback, this benefits other users. Another option could be to not use the control but instead use the object model also without making it visible.

 
Web mp2kmag.com
mapforums.com