General information
Category:
Coding, syntax & commands
Patrick,
You are correct if you are placing the control on a form, the event fires nicely. Look at my code - no form, no textbox, nada. Try it for yourself :>)
UPDATE:
You are also correct about the looping - assuming all your processing code is maintained within the ONCOMM event. Others here have convinced me that this is not very OOPy - "Events call methods" is I believe the phrase. So I tend to keep the code very tight in that event - grab the data, stuff it away somewhere, deal with it later. Works for me.
>PMFJI -
>
>yep, the MSCOMM32.OCX is a good way to go, but you don't really
>need the VFPCOM utility to bind events, because the MSCOMM32
>control already has an event that fires every time it receives
>a character. that event is the "OnComm" event. all you need
>to do is to react to that event on every received character
>and buffer (them) somewhere, and when your received character
>is CR and/or LF, send your entire buffer to the textbox, and
>clear the buffer. no need for any looping to check the MSCOMM32
>control status either, since the event fires asynchronously.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only