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;