aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine
diff options
context:
space:
mode:
authorjtsshieh <[email protected]>2017-08-30 06:52:49 -0400
committerjtsshieh <[email protected]>2017-08-30 06:52:49 -0400
commit237ca231a4cf35da78c1e474f3d6bc8dc657d13f (patch)
tree771ae99a3aee0b737e222502bfb14291e17b0a13 /Histacom2.Engine
parent4bc215e200214834e844443f81114280e9156f09 (diff)
downloadhistacom2-237ca231a4cf35da78c1e474f3d6bc8dc657d13f.tar.gz
histacom2-237ca231a4cf35da78c1e474f3d6bc8dc657d13f.tar.bz2
histacom2-237ca231a4cf35da78c1e474f3d6bc8dc657d13f.zip
Made the maximize not cover the taskbar
Diffstat (limited to 'Histacom2.Engine')
-rw-r--r--Histacom2.Engine/Template/WinClassic.cs15
1 files changed, 11 insertions, 4 deletions
diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs
index 23ea562..20e66f0 100644
--- a/Histacom2.Engine/Template/WinClassic.cs
+++ b/Histacom2.Engine/Template/WinClassic.cs
@@ -205,10 +205,13 @@ namespace Histacom2.Engine.Template
WinClassic_Activated(null, null);
}
- public bool max = false;
+ 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 +223,10 @@ namespace Histacom2.Engine.Template
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,11 +241,12 @@ namespace Histacom2.Engine.Template
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;
}
-
+
}
// The rest of this code will automatically style the buttons on the form!