CodeItBetter Programming Another VB Programming Blog

How to show/hide the cursor/caret in a text box

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
'Controls - How to show/hide the cursor/caret in a text box
Private Declare Function ShowCaret Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function HideCaret Lib "user32" (ByVal hwnd As Long) As Long
 
Private Sub Text1_GotFocus()
    HideCaret Text1.hwnd
End Sub
 
Private Sub Text1_LostFocus()
    ShowCaret Text1.hwnd
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.