Q: Windows forms: how to do a thick blinking cursor on a textbox? I am rewriting a windows forms application (updated framework, rewrote the logic, etc.) and there is one thing that I just can't figure out how they did.
Textboxes in the original application had a thick blinking cursor like so: http://screencast.com/t/8QYUcjuh3n
For the life of me I can't figure how to do this.  Please help?

A: You can do it with pinvoke CreateCaret
The example uses a Winform with a button (button1) and textbox (textBox1).
Add this using directive:
using System.Runtime.InteropServices;

Add these declarations:
[DllImport("user32.dll")]
static extern bool CreateCaret(IntPtr hWnd, IntPtr hBitmap, int nWidth, int nHeight);
[DllImport("user32.dll")]
static extern bool ShowCaret(IntPtr hWnd);  

Add this code to the button click event:
  // Thickness is set where I have 10.
  CreateCaret(textBox1.Handle, IntPtr.Zero, 10, textBox1.Height);
  ShowCaret(textBox1.Handle);

When you click the button you'll get a thicker cursor.
There's also a discussion of this here.
