Results 1 to 2 of 2

Thread: Carat Color Red

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2012
    Posts
    171

    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

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    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
  •  



Click Here to Expand Forum to Full Width