March 3, 2021
Hot Topics:

Using Carets

  • By Scott Lloyd
  • Send Email »
  • More Articles »

Most carets blink. It helps draw attention to the insertion point. The blinking, however, is an optional and you can set the speed but whether you're disabling the blinking or just setting the speed, you'll use the same function. It is advisable not to set the speed if you're not disabling it because Windows has a default setting for this and as many decisions as are possible should remain up to the user. The function used to set or disable the cursor blink rate is SetCaretBlinkTime.

Public Declare Function SetCaretBlinkTime _
    Lib "User32" _
    (ByVal uMSeconds As Long) As Long

Here the uMSeconds argument defines the blink rate in milliseconds (thousandths of a second). If you don't want your cursor to blink, simpily set his argument to zero.

Note: SetCaretBlinkTime has a sister function GetCaretBlinkTime which I didn't cover because firstly it's function is obvious and secondly it's not terribly useful.

Page 3 of 4

This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Thanks for your registration, follow us on our social networks to keep up-to-date