text中如何实现显示和不显示鼠标指针?
搜到说是要用API,但是不懂,求教.
就是说我想在text中按下任何键都不显示鼠标,键释放后再将鼠标指针放在最后,要不然在使用方向键微调数值大小的时候鼠标指针会左右走动,强制转到最后有闪烁,这样不好用.
[解决办法]
你要隐藏光标吗?
Declare Function HideCaret Lib "user32" Alias "HideCaret" (ByVal hwnd As Long) As Long
Private Sub TextBox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.GotFocus
HideCaret(Me.TextBox1.Handle.ToInt64)
End Sub