65.9K
CodeProject is changing. Read more.
Home

TrayCalendar.NET

starIconstarIcon
emptyStarIcon
starIcon
emptyStarIconemptyStarIcon

2.82/5 (8 votes)

Feb 18, 2006

CPOL
viewsIcon

38517

downloadIcon

701

A simple application that places a date in the system tray

Introduction

Years ago when Chris Maunder published his MFC TrayCalendar app, I added a few features that I wanted such as being able to copy the current date to the clipboard, and a dialog to show the calendar so I copy date ranges and look at what date of the week my niece's birthday was on or what not.

I recently hacked up a .NET version of the app. The difference is that the system tray icons are created dynamically.

The code to convert an Image to an Icon actually came from the Web:

// Convert an image to an Icon
System.Drawing.Icon ImageToIcon(System.Drawing.Image image)
{
    return System.Drawing.Icon.FromHandle(((Bitmap) image).GetHicon());
}

I'd like to add other features like integrating with Outlook.

Update

I removed the timer control and used the Win32 SetTimer. I think there is an issue with the font too.