码迷,mamicode.com
首页 > Windows程序 > 详细

窗体最小化时,不挡住任务栏

时间:2014-05-09 12:25:02      阅读:452      评论:0      收藏:0      [点我收藏+]

标签:tar   c   width   a   name   for   

 /// <summary>
        /// 窗体最小化时,隐藏到系统托盘
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void MainFace_SizeChanged(object sender, EventArgs e)
        {
            if (this.WindowState == FormWindowState.Minimized)
            {
                this.Hide();
                this.notifyIcon1.Visible = true;
            }
        }

        private void notifyIcon1_Click(object sender, EventArgs e)
        {
            this.Visible = true;
            this.WindowState = FormWindowState.Maximized;
            this.MaximumSize = new System.Drawing.Size(Screen.PrimaryScreen.WorkingArea.Width,Screen.PrimaryScreen.WorkingArea.Height+6);
            this.notifyIcon1.Visible = false;
        }

窗体最小化时,不挡住任务栏,布布扣,bubuko.com

窗体最小化时,不挡住任务栏

标签:tar   c   width   a   name   for   

原文地址:http://www.cnblogs.com/markli/p/3708761.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!