Just like the title: I\'ve searched the web for an answer, but i was not able to find a way to hide the caret of a RichTextBox in VB.NET.
I\'ve tried to set the Rich
Here I have a Rich Text control named txtMessage, it's events are handled to hide caret on events that would show it.
Private Shared Function HideCaret(ByVal hWnd As IntPtr) As Boolean
End Function
Public Sub New()
txtMessage.ReadOnly = True
txtMessage.TabStop = False
End Sub
Private Sub txtMessage_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtMessage.KeyUp
HideCaret(txtMessage.Handle)
End Sub
Private Sub txtMessage_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles txtMessage.MouseDown
HideCaret(txtMessage.Handle)
End Sub
Private Sub txtMessage_SelectionChanged(ByVal sender As Object, ByVal e As EventArgs) Handles txtMessage.SelectionChanged
HideCaret(txtMessage.Handle)
End Sub