fixed switching to full screen in opengl, removed topmost flag

This commit is contained in:
Alexander Eckart committed 2012-03-19 17:38:52 +01:00
1 parent 6734ddb7e0
commit d693e35660
1 file changed
+9 -5
+9 -5
View File
@@ -121,7 +121,6 @@ namespace Vocaluxe.Lib.Draw
control.MouseEnter += new EventHandler(this.OnMouseEnter); control.MouseEnter += new EventHandler(this.OnMouseEnter);
this.ClientSize = new Size(CConfig.ScreenW, CConfig.ScreenH); this.ClientSize = new Size(CConfig.ScreenW, CConfig.ScreenH);
//this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.Opaque, true);
this.CenterToScreen(); this.CenterToScreen();
} }
@@ -285,8 +284,15 @@ namespace Vocaluxe.Lib.Draw
this.DesktopBounds = new Rectangle(Screen.AllScreens[ScreenNr].Bounds.Location, this.DesktopBounds = new Rectangle(Screen.AllScreens[ScreenNr].Bounds.Location,
new Size(Screen.AllScreens[ScreenNr].Bounds.Width, Screen.AllScreens[ScreenNr].Bounds.Height)); new Size(Screen.AllScreens[ScreenNr].Bounds.Width, Screen.AllScreens[ScreenNr].Bounds.Height));
this.TopMost = true;
this.Show(); if (this.WindowState == FormWindowState.Maximized)
{
this.WindowState = FormWindowState.Normal;
RResize();
this.WindowState = FormWindowState.Maximized;
}
else
RResize();
CConfig.SaveConfig(); CConfig.SaveConfig();
} }
@@ -299,8 +305,6 @@ namespace Vocaluxe.Lib.Draw
this.FormBorderStyle = FormBorderStyle.Sizable; this.FormBorderStyle = FormBorderStyle.Sizable;
this.DesktopBounds = new Rectangle(_restore.location, new Size(_restore.width, _restore.height)); this.DesktopBounds = new Rectangle(_restore.location, new Size(_restore.width, _restore.height));
this.TopMost = false;
CConfig.SaveConfig(); CConfig.SaveConfig();
} }
#endregion Helpers #endregion Helpers