I have a combo box in which all serial ports should be listed. I have this functionality. Now I just want to sort it. Combobox contents order:
Before sorting:
COM3
COM1
COM9
COM10
I've tried to make it with
Combobox.Sorted = True
but then COM10 is at the 2nd position. How can I solve it to make it look like this?
COM1
COM3
COM9
COM10
I want that without ICompare. A Sub will be not bad.
My Code for filling the Combobox:
For Each sp As String In My.Computer.Ports.SerialPortNames
cmbComPort.Items.Add(sp)
cmbComPort.Sorted = True
Next