sysTrayShowMessage()

Shows a balloon message in the system tray with a given title, message, icon, and timeout.

Synopsis

int sysTrayShowMessage(string title, string message, string icon = "", int timeout = 10000)

Parameter

Parameter Description
title Title text of the message.
message The content/message text to display.
icon

Icon for the message. Can be an empty string (no icon), one of the following special names: "::Information", "::Warning", "::Critical", or a relative path to a custom icon.

Note:
Custom icons may not be supported on all systems.
timeout Display duration in milliseconds. Default is 10000. May be ignored by the system (e.g., on Windows when the app has focus).

Return Value

Returns 0 on success. Returns -1 in case of an error.

Details

The function shows a balloon message in the system tray for the entry with the specified title, message, and optional icon. Display duration can be set via parameter timeout.

Note:
Showing messages depends on the system configuration and user preferences. Therefore, messages may not appear at all.
CAUTION:
This function should not be used as the sole method to communicate critical information to the user.

Availability

CTRL

Assignment

System Tray