1、For i As Integer=0 To Tables("信息表").rows.count-1
if Tables("信息表").rows(i)("姓名") = e.form.controls("combobox").text
Dim txt As WinForm.label
txt = e.Form.CreateControl("label" & i, ControlTypeEnum.label)
txt.text = Tables("信息表").rows(i)("评价内容")
txt.Left = 100
txt.Top = 48*i + 50
txt.autosize = True
e.Form.AddControl(txt)
end if
Next
2、
For Each dr As DataRow In DataTables("信息表").Select("姓名='" & e.form.controls("combobox").text & "'")
Dim txt As WinForm.label
txt = e.Form.CreateControl("label" & i, ControlTypeEnum.label)
txt.text = dr("评价内容")
txt.Left = 100
txt.Top = 48*i + 50
txt.autosize = True
e.Form.AddControl(txt)
Next