Drawing a blinking caret in Winforms

I am developing a custom control that most resembles a text area. I am drawing text that works correctly and accepts input, which works as well. But I (the user) leave guessing when the caret is during input, since I am doing everything manually. How do I draw a blinking carriage to show where I am typing? Is there a standard way to do this?

+1


a source to share


1 answer


I think, annoyingly, there is no managed API for Carets. Therefore, you should either use PInvoke for the Win32 Pocket functions, or implement this functionality yourself (for example, draw and hide the blinking caret when and only when your control has input focus).



See Custom Caret for WinForms TextBox for example.

+2


a source







All Articles