From Xojo Documentation

Read-Only Property (As DockItem )

DockItemValue = aWindow.DockItem

Supported for all project types and targets.

Enables you to access the DockItem class to manipulate the dock item associated with the window (macOS only).


The DockItem class has two methods, UpdateNow and ResetIcon, and one property, Graphics. Use the methods of the Graphics class to modify the appearance of the icon. (The Graphics property may be Nil; it is non-Nil only when a macOS window has been minimized to the dock.) The ResetIcon method resets the icon to its original state (default appearance). Since a macOS icon is intended to be scaled automatically, you should design it as a 512 x512 pixel icon and include smaller sizes. Call the UpdateNow method to redraw the icon. You can also use the ClearRect property of the Graphics class to start over form a blank icon. Anything you can do with a Graphics object you are able to do with the Dock's Graphics object (like drawing in a picture or using a Shape 2D). The Dockitem property of the Application class enables you to control the DockItem for the whole application.