Familiar Slight of Hand with the Timer Control

Visual Basic 6 programmers learned how to get a lot of mileage out of the Timer control. VB .NET has a Timer too, and to help provide you with a familiar footing we will start with using the Timer in VB .NET.

Using the Timer control is not multithreaded programming. The Timer control relies on the event model. The Timer control hooks into the operating system's timer—the same clock that drives your CPU—and keeps track of ticks. The ticks are used to measure the passage of time, and the Timer.Interval property is compared to how much time has passed. When the interval has elapsed, the Timer control raises the Tick event. If you write an event handler for the Tick event, you can perform background ...

Get Visual Basic® .NET Power Coding now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.