diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs index 23ea562..5b72775 100644 --- a/Histacom2.Engine/Template/WinClassic.cs +++ b/Histacom2.Engine/Template/WinClassic.cs @@ -206,9 +206,11 @@ private void border_MouseDown(object sender, MouseEventArgs e) } public bool max = false; - + public Size prevSize; + public Point prevPoint; private void maximizebutton_Click(object sender, EventArgs e) { + if (max == false) { this.right.Hide(); @@ -220,7 +222,10 @@ private void maximizebutton_Click(object sender, EventArgs e) this.topleftcorner.Hide(); this.toprightcorner.Hide(); this.Dock = DockStyle.Fill; - this.WindowState = FormWindowState.Maximized; + prevSize = this.Size; + prevPoint = this.Location; + this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height - 28); + this.Location = new Point(0, 0); max = true; maximizebutton.Image = Engine.Properties.Resources.WinClassicRestore; } @@ -235,7 +240,8 @@ private void maximizebutton_Click(object sender, EventArgs e) this.topleftcorner.Show(); this.toprightcorner.Show(); this.Dock = DockStyle.None; - this.WindowState = FormWindowState.Normal; + this.Size = prevSize; + this.Location = prevPoint; max = false; maximizebutton.Image = Engine.Properties.Resources.WinClassicMax; } diff --git a/Histacom2.sln b/Histacom2.sln index 4e0ee6a..25f48ed 100644 --- a/Histacom2.sln +++ b/Histacom2.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.24720.0 +# Visual Studio 15 +VisualStudioVersion = 15.0.26430.15 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Histacom2.Engine", "Histacom2.Engine\Histacom2.Engine.csproj", "{9477B70F-2D32-4E1D-857B-4624A1DEEB1B}" EndProject @@ -16,7 +16,6 @@ Global EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {9477B70F-2D32-4E1D-857B-4624A1DEEB1B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9477B70F-2D32-4E1D-857B-4624A1DEEB1B}.Debug|Any CPU.Build.0 = Debug|Any CPU {9477B70F-2D32-4E1D-857B-4624A1DEEB1B}.Debug|x86.ActiveCfg = Debug|Any CPU {9477B70F-2D32-4E1D-857B-4624A1DEEB1B}.Debug|x86.Build.0 = Debug|Any CPU {9477B70F-2D32-4E1D-857B-4624A1DEEB1B}.Release|Any CPU.ActiveCfg = Release|Any CPU