I lean the ways of the work from VFP into MapPoint
I apeared to be simple thing, but I was faled to get back reaction from MapPoint ( user manual operations on the map) into VFP
I tried to use function eventhandle, and got the message -Interface fro Applicationevents is not supported
I had code on the VFP form
*****
objApp=CREATEOBJECT('MapPoint.Application')
Set Procedure To mapev.prg
ses=Newobject("MapPointEvents")
?Eventhandler(objApp,ses)
objApp.Visible = .t.
objApp.UserControl = .t.
objApp.OpenMap(objApp.Path + "\Samples\Clients.ptm")
***
and in mapev.pgr I wrote
****
Define Class MapPointEvents As Session OlePublic
Implements ApplicationEvents In 'mappoint.application'
Procedure ApplicationEvents_Open() As VOID
_Screen.ActiveForm.text1.Value= "ApplicationEvents_Open() "
Endproc
Procedure ApplicationEvents_Quit() As VOID
* add user code here
_Screen.ActiveForm.text1.Value='ApplicationEvents_Quit()'
Endproc
I tried applicationevents1, 2-same result
It was easy to put mappoint activex directly on the VFP form and get some events ( it also had some mistery, I explain later), but it was not my user wanted. He wishes VFP forms an MapPoint being separatly
So, now about mappoint activex control
It worked in VFP for good, but according to MapPoint help it should have same events/methods/properties as mappoint application
I compared it, ad detected big difference . For example, it was not open event, events for selecting objects on the form etc. Really there were absolutly different events .
Thanks in advance, Vladimir
MVP-2006-2011, PHD in Math and Physics ,
host of
www.foxclub.ru,
VFP lector at Interface and Microinform companies
Head science researcher of VNIIA Rosatom.