Private Declare Function HideCaret Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ShowCaret Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Command1_Click()
Text1.SetFocus
Text1.SelStart = Len(Text1)
Text1.Text = "隐藏光标"
HideCaret Text1.hwnd
End Sub
Private Sub Command2_Click()
Text1.SetFocus
Text1.Text = "显示光标"
Text1.SelStart = Len(Text1)
ShowCaret Text1.hwnd
End Sub