Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EventHandler() with VFP COM returns .F.
Message
De
29/09/2006 17:26:36
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
EventHandler() with VFP COM returns .F.
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
01158296
Message ID:
01158296
Vues:
104
I created an EXE com control and when I try to bind with EventHandler, it always returns .F. The COM is from VFP. I made a classlib, added a timer and called it ShowTime. In the TIMER() event, the only code is:

WAIT WINDOW NOWAIT NOCLEAR TTOC(DATETIME())
RETURN

The class is olepublic, and it works just fine as a standalone. However, when I try to use the EventHandler() function, the binding returns false. I used the VFP object browser o make the class. I also made all the PEM hidden, except for ENABLED, INTERVAL, and TIMER (top and left were not options, so I could not hide them):

PUBLIC x, o
x=NEWOBJECT("myclass")
o=CREATEOBJECT("testcom.showtime")

? EVENTHANDLER(o,x)

DEFINE CLASS myclass AS SESSION OLEPUBLIC
IMPLEMENTS Ishowtime IN "testcom.showtime"

PROCEDURE Ishowtime_get_Interval() AS NUMBER
ENDPROC
PROCEDURE Ishowtime_put_Interval(eValue AS NUMBER @)
ENDPROC
PROCEDURE Ishowtime_Timer() AS VARIANT
ENDPROC
PROCEDURE Ishowtime_get_Top() AS NUMBER
ENDPROC
PROCEDURE Ishowtime_put_Top(eValue AS NUMBER @)
ENDPROC
PROCEDURE Ishowtime_get_Left() AS NUMBER
ENDPROC
PROCEDURE Ishowtime_put_Left(eValue AS NUMBER @)
ENDPROC
PROCEDURE Ishowtime_get_Enabled() AS LOGICAL
WAIT CLEAR
ENDPROC
PROCEDURE Ishowtime_put_Enabled(eValue AS LOGICAL @)
ENDPROC
ENDDEFINE


Is there an answer to my question. What do I need to do to make the EventHandler bind?

David
David
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform