在窗口1的afterload事件写入代码,例如
If User.Group = "经理" Then
e.Form.Controls("TreeView1").Visible = True
Else
msgbox("不是经理")
e.Form.Controls("TreeView1").Visible = False
End If