Example #1
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     //必须加上这个判断,否则窗体最小化后无法恢复和还原了
     if (this.WindowState != FormWindowState.Minimized)
     {
         FormPositionHelper.SaveSize(this);
     }
 }
Example #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //获取当前进程名称
            Process cur = Process.GetCurrentProcess();

            processName = cur.ProcessName;
            this.Text   = processName;
            FormPositionHelper.SetSize(this);
            //加载主面板
            ShowMain();
            //显示底部滚动信息
            InitScrollShow();
        }