About
Also called a tray icon NotifyIcon? is used to manipulate an icon outside of the normal view of a window.
Usage
Generally NotifyIcon? is used for its ContextMenu?. Text is the ToolTip? shown for the icon, and icon is the image of the NotifyIcon?.
Example
import dfl.all;
void main() {
auto form = new Form;
form.dockPadding.all = 5;
auto label = new Label;
label.text = "Look for the NotifyIcon!";
label.dock = DockStyle.FILL;
form.controls.add(label);
auto notifyIcon = new NotifyIcon;
notifyIcon.text = "Simple ToolTip";
notifyIcon.icon = SystemIcons.application;
notifyIcon.contextMenu = new ContextMenu;
auto currentMenuItem = new MenuItem;
currentMenuItem.text = "Example Menu";
currentMenuItem.click ~= delegate void (MenuItem m, EventArgs e) {
label.text = label.text ~ "\nYou Found IT!";
};
notifyIcon.contextMenu.menuItems.add(currentMenuItem);
notifyIcon.visible = true;
Application.run(form);
}
module dfl.notifyicon;
{
public final ContextMenu contextMenu;
[property setter]
public final ContextMenu contextMenu;
[property getter]
public final Icon icon;
[property setter]
public final Icon icon;
[property getter]
public final char[] text;
[property getter]
public final char[] text;
[property setter]
public final bool visible;
[property setter]
public final bool visible;
[property getter]
}