Class trayIcon
Shows tray icon.
public class trayIcon : IDisposable
Remarks
Wraps API Shell_NotifyIconW, NOTIFYICONDATAW. More info there.
This thread must dispatch messages.
Can be used by multiple threads (eg one thread adds tray icon and other thread later changes its tooltip).
Creates a hidden window that receives tray icon events (click etc).
Namespace: Au
Assembly: Au.dll
Constructors
Name | Description |
---|---|
trayIcon(int, bool) |
Fields
Name | Description |
---|---|
MsgNotify | Tray icon notification message. |
Properties
Name | Description |
---|---|
Hwnd | A hidden window automatically created for this tray icon to receive its notifications. |
Icon | Gets or sets icon. |
Id | Together with trayIcon.Hwnd identifies this tray icon. |
Tooltip | Gets or sets tooltip text. |
Visible | Gets or sets whether the tray icon is visible. |
notificationIconSize | Gets icon size for trayIcon.ShowNotification. |
Methods
Name | Description |
---|---|
Dispose() | Removes tray icon and disposes other resources. |
Dispose(bool) | |
Focus() | Activates taskbar and makes the tray icon focused for keyboard. |
GetRect(out RECT) | Gets tray icon rectangle in screen. |
HideNotification() | Hides notification. |
ShowNotification(string, string, TINFlags, icon) | Shows temporary notification window by the tray icon. |
WndProc(wnd, int, nint, nint) | Window procedure of the hidden window that receives tray icon notifications (trayIcon.MsgNotify) in version 4 format. If you override it, call the base function. |
Events
Name | Description |
---|---|
Click | When default action should be invoked (on click, |
Message | When received any message from the tray icon. |
MiddleClick | When the tray icon clicked with the middle button. |
NotificationClick | When clicked the notification window. |
PopupClose | When it's time to close custom tooltip etc shown on trayIcon.PopupOpen. |
PopupOpen | When it's time to open custom tooltip or some temporary popup window. If this event is used, does not show standard tooltip. |
RightClick | When a context menu should be shown (on right click or |