About the author
While working on the TTrayIcon component, I learnt how to convert NSImage to TBitmap, and vice versa.
In addition, I've also learnt how to
I've created a few class functions as a result, appropriately named as follows:
ConvertTBitmapToNSImage converts a Windows TBitmap to a Mac OS Cocoa NSImage. ConvertNSImageToTBitmap does the reverse.
Apparently, Mac OS's NSImage supported a few image types, including PNG, TIFF and BMP.
So, how does TTrayIcon behave?
When there's no icon assigned, it retrieves the application icon using ApplicationIcon, and then set it as the TrayIcon image. Currently, the TTrayIcon component supports the OnClick and onDblClick events. It also supports the Title property, which is new.
The FireMonkey TTrayIcon component is superior to the VCL TTrayIcon component as Mac OS supports both an icon and text beside the icon. However, on Windows, this requires the text to be drawn as an image.
More to come...
How to free more space on your home drive by redirecting the location for SDKs in RAD Studio
Learn the command line used to compile System.pas in Delphi
A method to design records so that they're allocated on a specific byte boundary, such as 16 bytes, 512 bytes, 4096 bytes, etc.
Learn why the map is cool in Go!