H
HardySpicer
I have
' Get serial com port names
For i = 0 To My.Computer.Ports.SerialPortNames.Count - 1
cboCommPorts.Items.Add(My.Computer.Ports.SerialPortNames(i))
Next
cboCommPorts.SelectedIndex = 0
where 0 is used as the default. However there are many new PCs that
don't have a serial port at all and the software fails. How do I put
code in here so as to check if teh serial port exists in the first
place? Then how do I default the combo box?
Hardy
' Get serial com port names
For i = 0 To My.Computer.Ports.SerialPortNames.Count - 1
cboCommPorts.Items.Add(My.Computer.Ports.SerialPortNames(i))
Next
cboCommPorts.SelectedIndex = 0
where 0 is used as the default. However there are many new PCs that
don't have a serial port at all and the software fails. How do I put
code in here so as to check if teh serial port exists in the first
place? Then how do I default the combo box?
Hardy