|
The OnReceivea event occurs when data has been received from the communications port and is stored in the receive queue waiting to be handled. AvailabilityDesign-Time: Read, Write / Run-Time: Read, Write Declarationprocedure OnReceive(Sender: TObject; Count:
Integer); RemarksWindows does not guarantee to send a message for every character received, especially at higher baud rates. Therefore, the best plan is to use the OnReceive handler to process all the data that is currently in the receive queue, using successive calls to Read or ReadStr until the queue is empty. Example 1procedure TForm1.hbComPort1OnReceive(Sender:
TObject; Count: Integer); Example 2procedure TForm1.hbComPort1OnReceive(Sender:
TObject; Count: Integer); |