コード例 #1
0
        public void Restore(Form targetForm)
        {
            targetForm.WindowState     = FormWindowState.Normal;
            targetForm.FormBorderStyle = FormBorderStyle.FixedSingle;
            // targetForm.TopMost = topMost;
            // targetForm.Bounds = bounds;
            IsMaximized = false;
            var m = orginalMode;

            DisplaySettings.ChangeDisplaySettings(ref m, 0);
        }
コード例 #2
0
 public void Maximize(Form targetForm)
 {
     if (!IsMaximized)
     {
         var m = Settings.GetDevmodeFor(0, 1024, 768);
         DisplaySettings.ChangeDisplaySettings(ref m, 0);
         IsMaximized = true;
         Save(targetForm);
         targetForm.WindowState     = FormWindowState.Maximized;
         targetForm.FormBorderStyle = FormBorderStyle.None;
         targetForm.TopMost         = true;
         WinApi.SetWinFullScreen(targetForm.Handle);
     }
     targetForm.TopMost = false;
 }
コード例 #3
0
 public FormState()
 {
     Settings    = new DisplaySettings();
     orginalMode = Settings.GetCurrentSettings(0);
 }