Exemplo n.º 1
0
 private void Btn_FullScreen_Click(object sender, EventArgs e)//全屏
 {
     if (frm == null)
     {
         frm = new FullScreen();
     }
     frm.KeyDown += frm_KeyDown;
     frm.Controls.Add(this.PB_Monitor);
     frm.ShowDialog();
 }
Exemplo n.º 2
0
 private void frm_KeyDown(object sender, KeyEventArgs e)
 {
     /*
      * 设置按下ALT+F4无效
      * 设置按下ESC退出全屏
      */
     if (e.KeyCode == Keys.F4 && e.Modifiers == Keys.Alt)
     {
         e.Handled = true;
     }
     if (e.KeyCode == Keys.Escape)
     {
         frm.Controls.Clear();
         this.Panel_Monitor.Controls.Add(this.PB_Monitor);
         frm.Close();
         frm = null;
     }
 }