|
-
May 11th, 2013, 06:52 AM
#1
Thread Starter
Addicted Member
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
-
May 11th, 2013, 11:13 AM
#2
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|