As an independent consultant who bills by the hour, I have to keep track of how much time I spend on projects for different clients. When various emergencies arise, that can get pretty confusing to reconstruct at the end of the day. I needed an easy way to monitor my time with just a few mouse clicks. So a few years ago I created the simple stopwatch application that you can download below. One click to start, another to stop. You can enter a description, and previously entered descriptions are remembered in a dropdown. You can run multiple instances to keep track of time for multiple clients. At the end of the day, you’ve got a total for each.
I wrote this as a C# Windows application using Visual Studio 2003. Converting it for VS 2005 introduced a challenge, because accessing a control from another thread (the timer’s) is now considered unsafe and throws an exception. So as you’ll see in the SetText method, I adopted a work-around from the MSDN documentation.