|
把下面复制到窗体, 点击文本框就会看到效果
'判断插入符光标的闪烁频率
Private Declare Function GetCaretBlinkTime Lib "user32" () As Long
'指定插入符(光标)的闪烁频率
Private Declare Function SetCaretBlinkTime Lib "user32" (ByVal wMSeconds As Long) As Long
Dim OldBlinkTime As Long, Retval As Long
Private Sub Form_Load()
'保存初始值
OldBlinkTime = GetCaretBlinkTime
'设置光标闪烁间隔,以毫秒为单位
Call SetCaretBlinkTime(500)
End Sub
Private Sub Form_Unload(Cancel As Integer)
'恢复初始状态
Call SetCaretBlinkTime(OldBlinkTime)
End Sub |
|