You need to use the Win32 Caret API as imported by the following code...
[DllImport("User32.dll")]
protected static extern int CreateCaret(
System.IntPtr hWnd, // handle to owner window
System.IntPtr hBitmap, // handle to bitmap for caret shape
int nWidth, // caret width
int nHeight // caret height
);
[DllImport("User32.dll")]
protected static extern int ShowCaret(
System.IntPtr hWnd // handle to window with caret
);
[DllImport("User32.dll")]
protected static extern int HideCaret(
System.IntPtr hWnd // handle to window with caret
);
--
Bob Powell [MVP]
Visual C#, System.Drawing
Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm
All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.