Creating Timers

All the controls you used in Hour 7, “Working with the Traditional Controls,” had in common the fact that the user can interact with them. Not all controls have this capability—or restriction, depending on how you look at it. Some controls are designed for use only by the developer. One such control is the Open File Dialog control you used in your Picture Viewer application in Hour 1, “Jumping in with Both Feet: A Visual C# .NET Programming Tour.” Another control that is invisible at runtime is the Timer control. The Timer control's sole purpose is to trigger an event at a specified interval of time.

Create a new Windows Application titled Timer Example. Change the name of the default form to fclsTimerExample and then set its ...

Get Sams Teach Yourself Microsoft® Visual C#™ .NET in 24 Hours 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.