mirror of
https://github.com/HistacomUnity/Histacom2-old.git
synced 2025-01-22 09:02:01 -05:00
Made the maximize not cover the taskbar
This commit is contained in:
parent
4bc215e200
commit
237ca231a4
1 changed files with 11 additions and 4 deletions
|
@ -205,10 +205,13 @@ private void border_MouseDown(object sender, MouseEventArgs e)
|
|||
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 @@ 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,11 +241,12 @@ 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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
// The rest of this code will automatically style the buttons on the form!
|
||||
|
|
Loading…
Reference in a new issue