List com ports ?

CdRsKuLL

Active member
Joined
Sep 26, 2006
Messages
40
Programming Experience
Beginner
Hi folks, I'm after getting a list of avaliable com ports if possible, I've searched about but can only find classic vb examples which I cant seem to port over. All I'm after is a list ie.. 1,2,5,8,40,41 so I can populate a combobox. Can anyone point me in the right direction ?

thanks

Steve
 
VB.NET:
[SIZE=2]ListBox1.DataSource = [/SIZE][SIZE=2][COLOR=#0000ff]My[/COLOR][/SIZE][SIZE=2].Computer.Ports.SerialPortNames[/SIZE]
[SIZE=2][/SIZE] 
[SIZE=2][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] p [/SIZE][SIZE=2][COLOR=#0000ff]As [/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] IO.Ports.SerialPort([/SIZE][SIZE=2][COLOR=#800000]"COM1"[/COLOR][/SIZE][SIZE=2])
[/SIZE][/SIZE]
 
Back
Top