一路向前走

其中的代码,如果您有更好的改进,请一定提出您的宝贵意见及建议

  :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: :: 管理 ::
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
posted on 2007-11-14 12:15  Adair  阅读(801)  评论(0编辑  收藏  举报