A Tray-Notification Icon Component

This section illustrates a technique for encapsulating the Windows shell tray-notification icon cleanly into a Delphi component. As you build the component—called TTrayNotifyIcon–you'll learn about the API requirements for creating a tray-notification icon as well as how to tackle some of the hairy problems you'll come across as you work to embed all the icon's functionality within the component. If you're unfamiliar with what a tray-notification icon is, it's one of those little icons that appear in the bottom-right corner of the Windows system taskbar (assuming that your taskbar is aligned to the bottom of your screen), as shown in Figure 16.1.

Figure 16.1. Tray-notification icons.

The API

Believe it or not, ...

Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.