Taskbar calendar icon

Published April 28, 2006
Advertisement

Download C# source and ClickOnce installer
Needs .NET Framework 2.0

Quick one* - makes a taskbar notification area (system tray) icon that shows the day of the month. If you hover the mouse cursor over it, it displays the full date.

Every 10 seconds it checks to see if the date has changed - if so, it redraws the image and updates it. It just draws the text to a bitmap and makes an icon out of it, which is pretty easy in .NET. I have seen it done by creating an icon for every single day, but, well, yuck. And that stops you from being able to change the colours and fonts or otherwise customize it without going to a lot of trouble. Right now it uses the colours from an active caption, and the default GUI font shrunk down to an appropriate size (I did try making the background transparent, but that creates some annoying drawing issues.) It's also pretty simple to add other information, such as the day of the week or month (although it clutters it somewhat) - shrink the font used for the day, create a smaller font for the new data, and shuffle things around a bit.

Next up: Good old-fashioned nice and simple Asteroids in C#. Tomorrow. Unless I forget, or it turns out to be boring, or I get distracted by something shiny. Shiny... like coins... oooh....

* Started this morning, spent most of the time mucking with the fonts to make it less ugly. Yes, I know it's still ugly.
0 likes 2 comments

Comments

Rob Loach
Wait, am I missing something here? There's already the date displayed in the status bar [wink]... That asteroids sounds neat, what APIs will you use?
April 28, 2006 10:11 PM
uavfun
The clock thing normally only shows the date if the taskbar is 2 rows high or more (precious, precious code space...) - otherwise, it's only in the tooltip. Which, like all tooltips, is flaky.

For Asteroids... I'm thinking either MDX or just straight GDI+. Really, the point is to show the mechanics, not fill it up with pages of explosion-drawing code.
April 28, 2006 10:51 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement