NotifyIcon notify = new NotifyIcon();
notify.Icon = new Icon(@"D:\xxx.ico");
notify.Visible = true;
/
//窗体大小改变,托盘出现或隐藏
private void Form1_Resize(object sender, EventArgs e)
{
if (this.WindowState == FormWindowState.Minimized)
{
this.Visible = false;
notifyIcon1.Visible = true;
///托盘气泡提示
int tipShowMilliseconds = 1000;
string tipTitle = "提示的标题";
string tipContent = "你所要显示的内容";
ToolTipIcon tipType = ToolTipIcon.Info;
notifyIcon1.ShowBalloonTip(tipShowMilliseconds, tipTitle, tipContent, tipType);
}
else
{
notifyIcon1.Visible = f