Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disabling activex control in form
Message
De
15/11/2001 14:03:34
 
 
À
15/11/2001 13:19:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00581654
Message ID:
00582273
Vues:
51
>>Wiki page recommends to use VFPCOM. VFPCOM dows not work with VFP 7.
>>So I used EVENTHANDLER() to attach my custom OnComm() event.
>>
>>I need to access to MSCOMM properties such as .input, .output
>>from attached event handler but this is impossible.
>>How to access control properties from binded event ?
>>
>
>Got me. I'm still using VFP6. My understanding is that VFP7 has VFPCOM built in. Check your documentation!

I explain my problem in VFP 6 terms.
Wiki page recommends to use the following sample.
It works, but I need to use loModemComm.Input property in basecustomclass.myoncomm event.

However, loModemComm variable is local variable and cannot be used.
How to use .Input property from myoncomm.oncomm() event without using global variable ?
DEFINE CLASS myoncomm AS basecustomclass
PROCEDURE oncomm
  * how I can use loModemComm.Input here. lOModemComm variable is out of
  * scope !?
   *-- Some code here...
ENDPROC
ENDDEFINE

In your code:

loModemComm = NEWOBJECT("MSCOMMLib.MSComm")
loEventHandler = NEWOBJECT("MyOnComm", "OnComm")
loVFPCOM = NEWOBJECT("VFPCOM.ComUtil")
loVFPCOM.BindEvents(loModemComm, loEventHandler)
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform