Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Events handle from VFP to MapPoint
Message
De
25/02/2003 01:43:28
Vladimir Zhuravlev
Institute of the Physics of Earth,Russia
Moscow Region, Russie
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Events handle from VFP to MapPoint
Divers
Thread ID:
00757424
Message ID:
00757424
Vues:
65
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform