I’m developing a custom control, which most resembles a text area. I am drawing text, which works correctly, and accepting input which also works.. But I (the user) am left guessing where the caret is while I type, since I’m doing everything manually.
How do I draw a blinking caret to show where I am currently typing? Is there a standard way to do this?
I’m developing a custom control, which most resembles a text area. I am drawing
Share
I think that, annoyingly, there is no managed API for Carets. You must, therefore, either PInvoke to the Win32 functions for carets, or, implement that functionality yourself (i.e. painting and hiding a blinking caret, when and only when your control has the input focus).
See Custom Caret for WinForms TextBox for example.