From Xojo Documentation


Serial.LookAhead([Encoding as TextEncoding ]) As String

Supported for all project types and targets.

Returns all the unread characters in the buffer without deleting them from the buffer. The optional Encoding parameter enables you to specify the text encoding of the data to be returned. Use the Encodings module to specify a text encoding.


This example stores the lookahead text in a TextField.

TextField1.Text = Serial1.LookAhead(Encodings.UTF8)