首页 > Windows开发 > 详细

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

时间:2014-05-09 12:23:24      阅读:390      评论:0      收藏:0      [点我收藏+]

 /// <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

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!