Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MScomm class definition
Message
De
31/05/2005 15:57:02
 
 
À
31/05/2005 15:52:23
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01018748
Message ID:
01018826
Vues:
34
>Mark,
>
>>>Without seeing more code showing all the containership - impossible to tell ;-) I'll hazard a guess:
>>>
>>>THISFORM.ComReader.WhateverTheControlNameIs.INPUT
>>But in that case I am talking to comm control directly.
>>Why then do I need EVENTHANDLER at all?
>
>Notice my checking for the COMMEVENT=2 - this event signals that data is available in the INPUT buffer and needs processing. Without EVENTHANDLER, you would be limited to polling the port with a timer or user action of some sort. With EVENTHANDLER, you are binding your code to the event and it will run only when the event occurs. Also note there are a number of other subevents of ONCOMM that may require action on your part - most notably errors. If you are interested, I can email you a VCX that may clarify what I'm saying.
But I can't reference the form in that code:
PROCEDURE DMSCommEvents_OnComm ;
HELPSTRING "Occurs whenever the value of the CommEvent property changes."
* add user code here
With ThisForm && Generates an error
ENDPROC
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform