Private Declare Function CreateCaret Lib "user32" _ (ByVal hWnd As IntPtr, ByVal hBitmap As IntPtr, _ ByVal nWidth As Integer, _ ByVal nHeight As Integer) As Boolean Private Declare Function ShowCaret Lib "user32" _ (ByVal hWnd As IntPtr) As Boolean CreateCaret(TextBox1.Handle, IntPtr.Zero, 15, 15) ShowCaret(TextBox1.Handle)