Jump to content
Sign in to follow this  
  • entries
    14
  • comments
    17
  • views
    5679

Taskbar calendar icon

Sign in to follow this  
uavfun

230 views


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.
Sign in to follow this  


2 Comments


Recommended Comments

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?

Share this comment


Link to comment
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.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!