Click here to Skip to main content
Click here to Skip to main content

Tray Calendar

, 2 Aug 2003 CPOL
Rate this:
Please Sign up or sign in to vote.
A simple application that places a date in the system tray

Sample Image - traycalendar.gif


Tray Calendar is a freeware utility that I wrote after being amazed that

  1. Microsoft did not bother to offer us a calender in the tray, and
  2. People were charging good money for tiny little tray apps.

The idea is simple: Put the day of the month next to the clock in the system tray. It tells you todays date, and will update the number displayed when the date changes. 20 seconds after it starts it will reshuffle itself so that it is the right-most icon in the tray. This is useful if you put it in the "Startup" folder (so it starts automatically) becuase during startup other icons such as virus checkers and such may get between the calender and the clock.

The only options are that you can disable date checking, disable auto-shuffle, and you can change the auto-shuffle time. Right click on the date icon for the options dialog.

The class is based on my CSystemTray class, and serves as a fairly quick and dirty example of how to use it.

Tray Calendar now works in CE 2.0-2.11 and VC++ .NET


  • 6 Apr 2002 - app now checks the date when the computer comes out of hibernation or suspension (Thanks to Derek Waters)
  • 3 Aug 2003 - Updated SystemTray class now recreates thetray icon after Explorer crashes and restarts.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Chris Maunder
Founder CodeProject
Canada Canada
Chris is the Co-founder, Administrator, Architect, Chief Editor and Shameless Hack who wrote and runs The Code Project. He's been programming since 1988 while pretending to be, in various guises, an astrophysicist, mathematician, physicist, hydrologist, geomorphologist, defence intelligence researcher and then, when all that got a bit rough on the nerves, a web developer. He is a Microsoft Visual C++ MVP both globally and for Canada locally.

His programming experience includes C/C++, C#, SQL, MFC, ASP, ASP.NET, and far, far too much FORTRAN. He has worked on PocketPCs, AIX mainframes, Sun workstations, and a CRAY YMP C90 behemoth but finds notebooks take up less desk space.

He dodges, he weaves, and he never gets enough sleep. He is kind to small animals.

Chris was born and bred in Australia but splits his time between Toronto and Melbourne, depending on the weather. For relaxation he is into road cycling, snowboarding, rock climbing, and storm chasing.
Follow on   Twitter   Google+   LinkedIn

Comments and Discussions

GeneralExcuse~ Why can't I download the source code ? Thanks~ Pinmemberanmytry5-Jan-08 16:32 
GeneralMake it use 'long date' format as defined in Regional and Language Options [modified] Pinmemberahtiger23-Nov-07 0:58 
GeneralHelp Required PinmemberSreekanth Muralidharan20-Dec-05 2:49 
GeneralRe: Help Required Pinmembermike.sun12-Oct-06 0:12 
Generalthankx for bug fix Pinmembervikas amin24-Aug-05 5:41 
GeneralLocal days and months names... PinmemberTomas Jakl8-Jul-05 5:50 
Generalchange version number Pinmembercebusong16-Jul-04 9:49 
QuestionHo to activate the application from the Explirer? PinsussPlamen Petrov27-May-04 4:45 
Hi, Chris,

Thank you for the reusable component!

I have a question: is it possible to activate the main window of the tray application when it's doubleclicked in the Windows Explorer? Now you are just not allowing the application to run twice (when you find it's window by ::FindWindow(...)).

I've tried, but without success. If I doubleclick the icon at the system tray, it activates the window. When I doubleclick the application in Explorer, the newly started instance finds the running instance's tray window and sends/posts to it a message (I've registered a message for this purpose). Then the CSystemTray processes the message in the same way how it processes the doubleclick of the icon at the system tray. But this doesn't work. Everything seems to be OK, but the window isn't shown, and its icon on the taskbar is missing. But if after that I rigt-click the system tray icon, it appears (the main window appears and its icon on the system tray too).

Probably I need to do something more, to call adittional SDK function?
Do you know the reason?

Best regards,
Plamen Petrov

Answercheck out YahooPOPs source code Pinmembercebusong16-Jul-04 9:06 
GeneralTray Calendar doesn't update PinmemberKimN26-Apr-04 5:38 
GeneralRe: Tray Calendar doesn't update Pinmembercebusong16-Jul-04 9:11 
GeneralShuffle works in reverse PinmemberKimN23-Apr-04 6:35 
GeneralCompilation Fails with Visual C++ v6.0 PinmemberStevenYoungs4-Aug-03 3:17 
GeneralThanks!! PinmemberWREY4-Aug-03 20:30 
QuestionWindows CE 2.11 also? Pinmemberwrenhal13-Jul-03 4:50 
GeneralNO problem with Tray Calendar download... PinmemberJohn H. Doyle2-Mar-03 6:09 
GeneralTray Calendar Download Problem PinmemberJohn H. Doyle2-Mar-03 6:06 
QuestionHow to acees the PRINTER via my eVC++ application PinmemberAKSIVAKUMAR26-Feb-03 22:58 
QuestionHow to send FAX via my eVC++ application PinmemberAKSIVAKUMAR26-Feb-03 22:42 
GeneralAdding to startup PinmemberJack_pt22-Feb-03 4:43 
GeneralRe: Adding to startup PinmemberAKSIVAKUMAR26-Feb-03 22:37 
GeneralMetric Time in tray Pinmemberrehgf23-Jul-02 17:53 
GeneralRe: Metric Time in tray Pinmemberirekz@yahoo.com30-Jan-03 0:13 
GeneralXp Pinmemberswinefeaster14-Apr-02 21:10 
GeneralRe: Xp PinadminChris Maunder14-Apr-02 21:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150414.1 | Last Updated 3 Aug 2003
Article Copyright 2000 by Chris Maunder
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid