老师好。下面代码运行红色字体的时候出现错误:
Dim tv1 As WinForm.TreeView = e.Form.Controls("Tree配置栏")
Dim tb1 As Table = Tables (e.Form.Name & "_table1")
Dim list_cd As New List(Of String)
For Each r As Row In tb1.Rows
list_cd.Add (r("菜单控件"))
Next
For Each nd As WinForm.TreeNode In tv1.AllNodes
Dim s As String = nd.FullName
If list_cd.Contains (s) Then
nd.ForeColor = Color.red
nd.Backcolor =color.Yellow
Dim fnd As WinForm.TreeNode = nd.ParentNode
fnd.Expand ()
End If
Next
‘-------------------------------------错误提示如下
.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2022.8.18.1
错误所在事件:窗口,菜单权限,Button1,Click
详细错误信息:
未将对象引用设置到对象的实例。
请您帮忙看看怎么回事?谢谢