SerialDevice.WithName

From Xojo Documentation

Method

SerialDevice.WithName(deviceName as String) As SerialDevice

New in 2019r2

Supported for all project types and targets.

Gets the serial device by its name.

Notes

If you're unsure what the names of the various serial devices are, you can loop through them to get the names. See the example below.

Examples

The following displays the names of the serial devices on the computer:

For i As Integer = 0 To SerialDevice.LastIndex
MessageBox(SerialDevice.At(i).Name)
Next