c#中的程序如何做成像qq一样最小化后放在任务右下角

解决方案 »

  1.   

    1、notifyIcon控件拖到主窗体
    2、设置notifyIcon控件icon
    3、拖ContextMenu
    4、设置notifyIcon控件ContextMenu
    5、添加notifyIcon控件双击事件
    6、设置主窗体ShowInTaskbar=false绿色辅助工具——《Csdn收音机》帮你轻松掌握Csdn最新动向!
      

  2.   

    winform提示框
    http://topic.csdn.net/u/20090107/14/b88e5735-7912-4e23-abea-3c6b05a8a31b.html
      

  3.   


    //20101209 系统托盘
            protected override void WndProc(ref Message m)
            {
                const int WM_SYSCOMMAND = 0x0112;
                const int SC_CLOSE = 0xF060;
                const int SC_MINIMIZE = 0xF020;
                Message.
                if (((m.Msg == WM_SYSCOMMAND) && ((int)m.WParam == SC_CLOSE)) || ((m.Msg == WM_SYSCOMMAND) && ((int)m.WParam == SC_MINIMIZE)))
                {
                    this.WindowState = FormWindowState.Minimized;
                    this.ShowInTaskbar = false;
                    return;
                    //this.Hide();
                }
                base.WndProc(ref m);
            }        private void showToolStripMenuItem_Click(object sender, EventArgs e)
            {
                this.WindowState = FormWindowState.Normal;
                this.ShowInTaskbar = true;
                this.Show();
            }        private void closeToolStripMenuItem_Click(object sender, EventArgs e)
            {
                if (MessageBox.Show("确定退出系统?", "提醒", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    Application.Exit();
            }        private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
            {
                this.WindowState = FormWindowState.Normal;
                this.ShowInTaskbar = true;
                this.Show();
            }