Serial.SerialPort

From Xojo Documentation

Revision as of 19:24, 3 January 2012 by Dbrandt (talk | contribs)

Property (As SerialPort )
aSerial.SerialPort = newSerialPortValue
or
SerialPortValue = aSerial.SerialPort

Supported for all project types and targets.

Used to identify the serial port to which the Serial control will communicate.

Example

This example is in the Open event of the main window of the Line State Change Tester app. It populates the popup menu of the serial ports available on the user’s computer.

' Populate the popup menu with all of the
' serial ports the system has installed.
dim i, count as Integer
count = System.SerialPortCount

for i = 0 to count - 1
PopupMenu1.AddRow( System.SerialPort( i ).Name )
next