10/07/13 22:42:28
>>616
最小構成サンプル
using System;
using System.Windows.Forms;
namespace nicon {
public class nicon {
System.Windows.Forms.NotifyIcon icon
= new System.Windows.Forms.NotifyIcon();
System.ComponentModel.ComponentResourceManager res
= new System.ComponentModel.ComponentResourceManager(typeof(nicon));
nicon() {
icon.Icon = (System.Drawing.Icon)res.GetObject("nicon");
icon.ContextMenu = new ContextMenu( new MenuItem[] {
new MenuItem("Exit", delegate { Application.Exit(); } )
});
}
[STAThread]
public static void Main(string[] args) {
nicon inst = new nicon();
inst.icon.Visible = true;
Application.Run();
inst.icon.Dispose();
}
}
}