遍历OPCServer的Item
Private Sub RecurBrowse(OPCBrowser As OPCBrowser)
'展开分支
OPCBrowser.ShowBranches()
For Each turn As Object In OPCBrowser
'lsbMesssage.Items.Add(turn.ToString())
Next
Dim dd(OPCBrowser.Count) As String
For I = 1 To OPCBrowser.Count
'lsbMesssage.Items.Add(OPCBrowser.Item(I))
Dim nodx As New TreeNode()
nodx.Text = OPCBrowser.Item(I).ToString
TreeView1.Nodes.Add(nodx)
dd(I) = OPCBrowser.Item(I).ToString
Next I
'展开叶子
OPCBrowser.ShowLeafs(True)
For I = 1 To OPCBrowser.Count
Dim nodx As New TreeNode()
nodx.Text = OPCBrowser.Item(I).ToString
TreeView1.Nodes.Add(nodx)
Next I
End Sub