Imports System Imports System.IO.Ports Imports System.Threading Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Try Dim ports As String() = SerialPort.GetPortNames Dim port As String For Each port In ports ComboBox1.Items.Add(port) Next port ComboBox1.SelectedIndex = 0 Catch ex As Exception MsgBox(ex.Message) End Try End Sub End Class
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)