![]() |
Web Development »
Applications & Tools »
Tools with source code
Intermediate
License: The Code Project Open License (CPOL)
XTimer - Timer and Stopwatch Utility with Source CodeBy Hans DietrichXTimer provides countdown timer and stopwatch features in a compact MFC dialog app. |
VC6Win2K, WinXP, MFC, Dev
|
|
Advanced Search Add to IE Search |
|
|
|
||||||||||||||||
XTimer is a useful tool for measuring time durations - for example, if you want to measure how long it takes for a program to run. XTimer offers these features:
There are three buttons on the main window: Start, which starts the timer/stopwatch and then changes to Stop; Reset, which sets the timer back to the zero position; and More, which displays the context menu (the context menu is also displayed by right-clicking on the window).
The context menu allows you to choose the XTimer mode - stopwatch or countdown timer. When you change mode, the XTimer caption changes to reflect the mode you have set. You can also access the Timer Options Dialog.
The Quick Timer sub-menu allows you to choose a time for the countdown timer, and will also automatically start the timer.
The Timer Options Dialog allows you to set the countdown time and the wav file to be played when the timer expires. If the Play Countdown Timer Sound is checked but no wav file is selected, XTimer will play its default sound. To completely disable all sounds, uncheck Play Countdown Timer Sound.
You can choose to play the sound only once, or play it continuously (every 30 seconds) until the Stop button is clicked. If the Play until stopped option is selected, the caption will change to XTimer [TIMER+].
XTimer.exe is self-contained and needs no other files (besides the standard MFC and system DLLs). After selecting the mode (and for the timer, the countdown time and sound options), click Start. The stopwatch/timer will begin running, and the Start button will change to Stop. If you click on the Stop button, it will change back to Start and the timer will stop running. The display will hold the last value displayed and will continue from the last value if you click on the Start button.
XTimer saves its settings to the registry in HKEY_CURRENT_USER\Software\CodeProject\XTimer.
This software is released into the public domain. You are free to use it in any way you like, except that you may not sell this source code. If you modify it or extend it, please to consider posting new code here for everyone to share. This software is provided "as is" with no expressed or implied warranty. I accept no liability for any damage or loss of business that this software may cause.
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 20 Aug 2007 Editor: Deeksha Shenoy |
Copyright 2003 by Hans Dietrich Everything else Copyright © CodeProject, 1999-2009 Web21 | Advertise on the Code Project |