vb如何使指定的区域加亮显示
请问vb中如何使文本框里指定的行加亮显示啊,谢谢各位了。
[解决办法]
用富文本框控件可以做到.
[解决办法]
Private Sub Form_Load() '文本框MultiLine在属性设置为True Text1.Text = "aaaaaaa" & vbCrLf & _ "bbbbbbbb" & vbCrLf & _ "ccccccccc" & vbCrLf & _ "dddddddddd" Dim iLine As Integer, iLS() As String Dim i As Integer, iLen1 As Integer iLine = 3 '高亮第几行 iLS = Split(Text1, vbCrLf) If iLine <= UBound(iLS) + 1 Then For i = 0 To iLine - 2 iLen1 = iLen1 + Len(iLS(i)) + 2 Next Text1.SelStart = iLen1 Text1.SelLength = Len(iLS(i)) End If End Sub