March 3, 2021
Hot Topics:

Using Carets

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

So you want to make the next MS Word and you want to do it in VB, eh? You've no doubt found some of Visual Basic's text-drawing functions to be handy but what about one of those fancy cursors that all the sophisticated programs use? Did you ever stop and wonder how they do it? Do they draw a line, set a timer, and invalidate a rectangle around it? They most certainly do not. The Windows API helps us out a lot in this area with something called a caret.

Carets are those blinking (or sometimes non-blinking) text-insertion points that appear in almost every text editor. The beauty of carets is that one doesn't have to write that much extra code to implement them. With a few API calls, you can move your application up a notch without too much of a hassle. Let's look at what we'll need.

Page 1 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