Notifications
Clear all
BugOverflow
1
Posty
1
Users
0
Reactions
1,237
Widok
0
06/03/2020 12:55 pm
Topic starter
exmple code
1 Answer
0
06/03/2020 12:56 pm
Topic starter
var contextmenu = new ContextMenu(); MenuItem mi = new MenuItem(); mi.Header = "Close App"; mi.Click += (sender, args) => { this.Close(); Environment.Exit(0); }; var itm = contextmenu.Items.Add(mi); var TaskbarIcon tb = new TaskbarIcon(); tb.ToolTipText = "Test test test"; tb.Icon = (Icon)Properties.Resources.ikonaone; tb.TrayMouseDoubleClick += NotifyIconInteracted; tb.ContextMenu = contextmenu;