不可能的
Dim tr As WinForm.TreeView
msgbox(1)
Dim nd As WinForm.TreeNode
msgbox(2)
tr = e.Form.Controls("用户")
msgbox(tr is nothing)
nd = Tr.Nodes.Add("所有用户","所有用户")
msgbox(nd is nothing)
For Each u As UserInfo In Users
msgbox(u.name)
If u.Type = UserTypeEnum.User Then
msgbox(u.Group is nothing)
msgbox(tr.Nodes.Contains("所有用户"))
If tr.Nodes("所有用户").Nodes.Contains(u.Group) = False Then
msgbox(u.Group)
tr.Nodes("所有用户").Nodes.Add(u.Group)
End If
msgbox(tr.Nodes("所有用户").Nodes(u.Group) is nothing)
tr.Nodes("所有用户").Nodes(u.Group).Nodes.Add(u.Name)
End If
Next
tr.ExpandAll