Firstly I would like to acknowledge Mr.
Peter Horsbøll Møller for his assistance over the last few weeks in resolving my issues.
If you, like me jumped from the old 32 bit MapInfo environment to V17, then it was quite a leap. Although the examples supplied with the install were good, for me they were too complicated as a learning tool. The biggest piece of knowledge I was missing was on Winforms ElementHost class.
Once I understood the following it all became easy.
Every time MapInfo creates a window, in the WindowCreated event, create a Windows control to host it and assign the wpf mapinfo usercontrol to your win forms control. At the same time, store the information in arrays so the links between the Windows forms control and the MapInfo windows are all there for future use. So as further events are triggered, you have the array of required information to display, close, hide etc. win forms controls in accordance with what MapInfo is doing, and vice versa.
The examples with the install show heaps of functionality.
Most of the apps I write are far simpler and usually only display a map with limited user interaction, say simple selection only, so the need to accommodate multiple MapInfo windows is not required.
App.config - set up as per example code and integrated mapping instructions
References -
set up as per example code and integrated mapping instructions
I hope this assists anyone else out there who is having trouble getting a start.
------------------------------
Paul Thomas
GIS/Survey Department Officer
Cook Shire Council
Cooktown
------------------------------