VB Hack
May 9th, 2001, 09:49 PM
I need to write a simple program to read a text file through the com port. This is to be a one- way transmision through a cable (no errors). Am i better off trying to use the oncomm event, or setting up a loop to keep reading the buffer untill an end of file is recieved?
cksiow
May 9th, 2001, 09:53 PM
the best way is to use the oncomm event, which doesn't "eat" too much CPU time, loop is okay if you don't have other choice.
But beware, you need to have some escape sequence or key to identify the end of file, else you will be waiting forever for the oncomm event.
HTH
cksiow
http://vblib.virtualave.net - share our codes