此主题相关图片如下:qq截图20130606151127.jpg

Dim text1 As new Windows.Forms.RichTextBox
text1.Dock = Windows.Forms.DockStyle.Fill
text1.name = "RichTextBox1"
e.Form.Controls("SplitContainer3").panel1.BaseControl.Controls.Add(text1)
Dim dt As DataTable = DataTables("通讯表")
Dim font1 As New Font("楷体",16,FontStyle.Underline)
Dim font2 As New Font("宋体",16,fontstyle.Regular)
For Each dr As DataRow In dt.DataRows
If dr("已接收人").contains(_username) = False And dr("接收人").contains(_username) And dr("发信人") = dname Then
text1.Selectionfont = font1
text1.Selectioncolor = color.Green
text1.SelectedText = dr("发信人")
text1.Selectionfont = font2
text1.Selectioncolor = color.blue
text1.SelectedText = " " & dr("时间") & " 说道:" & vbcrlf
text1.SelectedRtf = dr("内容") '& vbcrlf
dr("已接收人")=dr("已接收人") & _username & "|"
dr.DataTable.Save()
End If
Next
text1.ScrollToCaret
text1.readonly = True
以上代码在窗口afterload后报错,请高手帮忙解决一下,调试错误在红色的行代码,不知道什么原因,谢谢~!!
[此贴子已经被作者于2013-6-6 15:29:49编辑过]