Difference between revisions of "Serial.SerialPort"

From Xojo Documentation

m
m
Line 7: Line 7:
 
| platform=all
 
| platform=all
 
}}
 
}}
Used to identify the serial port to which the Serial control will communicate.
+
{{Description
 +
|text = Used to identify the serial port to which the Serial control will communicate. }}
  
 
==Example==
 
==Example==

Revision as of 17:36, 25 January 2012

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