Dim t As Table = e.Form.controls("Table1").TableIf t.Cols.Contains("物品类别") AndAlso t.Cols.Contains("物品名称") Then Dim tr As WinForm.TreeView = Forms("共有窗体").Controls("TreeView2") tr.CreateTree(t.DataTable,"物品类别|物品名称")End If