概述
Imports Microsoft.Win32
Private Sub GetComList()
Dim keycom As RegistryKey = Registry.LocalMachine.OpenSubKey("Hardware""DeviceMap""SerialComm")
Dim str As String
If Not keycom Is Nothing Then
Dim sSubKeys() As String = keycom.GetValueNames()
cmbItem.clear()
For Each str In sSubKeys
Dim s As String = keycom.GetValue(str).ToString.Trim
Me.cmbPLC.Items.Add(s)
cmbitem.add(s)
Next
End If
End Sub
Private Sub GetComList()
Dim keycom As RegistryKey = Registry.LocalMachine.OpenSubKey("Hardware""DeviceMap""SerialComm")
Dim str As String
If Not keycom Is Nothing Then
Dim sSubKeys() As String = keycom.GetValueNames()
cmbItem.clear()
For Each str In sSubKeys
Dim s As String = keycom.GetValue(str).ToString.Trim
Me.cmbPLC.Items.Add(s)
cmbitem.add(s)
Next
End If
End Sub
转载于:https://www.cnblogs.com/msnadair/archive/2007/11/14/958990.html
最后
以上就是迷路老师为你收集整理的VB.NET中获取串口列表的全部内容,希望文章能够帮你解决VB.NET中获取串口列表所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复