Private Declare Sub CreateCaret Lib "user32" (ByVal w As Long, ByVal x As Long, ByVal y As Long, ByVal z As Long) 
    Private Declare Function ShowCaret Lib "user32" (ByVal x As Long) As Long 
    Private Declare Function GetFocus Lib "user32" () As Long 
     
     
    Sub Text1_GotFocus() 
     Dim h As Long, x As Long 
     h = GetFocus() ' get the handle to the text box 
     Call CreateCaret(h, 0, 8, 24) ' create new caret size 
     x = ShowCaret(h) ' show the new caret 
    End Sub 
<END>