Skinnable Clock for Windows is one of the demonstration apps for krpRegions Library
Download Skinnable Clock for Windows
The code was written for Borland Delphi in 1998 and still works :)
krpRegions Library was a set of components for Borland Delphi and Borland C++Builder designed to create skinnable user interfaces.
It was initially distributed by KARPOLAN from 1998 to 2000 and later by ABF software, Inc. from 2000 to 2010.
The library is now considered outdated.
This algorithm, developed in 1998 by KARPOLAN, revolves around the use of a multi-color mask, be it a bitmap or other graphic, to designate areas with different colors.
The multi-color mask is illustrated below:
- Each color area on the mask represents a distinct working area.
- The Gray area typically signifies the application's body.
- Yellow, Aqua, Red, Fucsia areas correspond to buttons, and so forth.
The algorithm involves detecting the color under the cursor and triggering events associated with the area of that color.
Additionally, you can create a region for each color area, allowing the identification of the currently active region (as implemented in the krpRegions Library).
As a result, the user perceives a non-rectangular window that aligns with the outer shape defined by the mask:
When the user clicks a on a specific area, the algorithm renders the "active" version of the skin on the screen:
Hover and disable states are achieved by incorporating skin versions specifically designed for these states.