0
Private Sub Write_code_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Write_code.TextChanged
Dim strWord As String
Dim lPos As Long
strWord = "read"
lPos = InStr(1, Write_code.Text, strWord, vbTextCompare)
If lPos > 0 Then
With Write_code
.SelectionStart = lPos - 1
.SelectionLength = Len(strWord)
.SelectionColor = Color.Green
.SelectionStart = Len(Write_code.Text)
.SelectionLength = 0
.SelectionColor = Color.Blue
End With
End If
End Sub
這是我的代碼,我有一個問題,當我再次打開該文本,它不能添加文字(可以只添加到末尾文本末尾的文字)。有沒有其他的代碼可以幫助我。使用顏色RichTextBox的,但是在CON TRO鼠標錯誤時附加字符的字符
您的標題不能反映您的問題的詳細信息。請更新以避免可能被關閉的問題。 – Codexer
對不起。我已經修復了它 –