-
Carat Color Red
Hello everyone,
Im using this code to change the carat size to cover at least one character which works, however, how do i change the color or the carat from black to red?
Code:
Private Sub TextBox2_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox2.GotFocus
CreateCaret(TextBox2.Handle, IntPtr.Zero, 10, TextBox2.Height)
ShowCaret(TextBox2.Handle)
End Sub
Cheers
-
Re: Carat Color Red
You can't change the color of the system caret, except between black and gray. You can however create a bitmap to be used instead of the system caret. To use a bitmap you pass in the bitmap handle as the second argument to CreateCaret, in which case the width and height arguments are ignored.