Information générale
Catégorie:
Contrôles ActiveX en VFP
Hi Peter,
A few things to try:
Get rid of the PUBLIC variable(s) and use a form property instead.
Don't wait for 5 characters before saving the .input to the form property - grab each character as it arrives, then test the string for the desired termination (CR, LF, string content, whatever).
Are you using VFP7? If so, try a INKEY(.1) prior to your DOEVENTS call to give it something to do. And play with the value.
I also see no reason in your code to continually open and close the port, at least between sends. You may have your reasons :-)
Last but not least, don't attempt any real debugging of this with the Debugger open. It may well be affecting your results. Timing things, you know...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement