diff options
| author | jtsshieh <[email protected]> | 2017-07-31 21:47:01 -0400 |
|---|---|---|
| committer | jtsshieh <[email protected]> | 2017-07-31 21:47:01 -0400 |
| commit | 312cd741458d2cb3a9274b671ce7b55bcd680849 (patch) | |
| tree | 6b9906d7443f6a93d8a44f0048a4ac8ee4b1145d /TimeHACK.Engine/Template/WinClassic.cs | |
| parent | 2c87be280cb1869331549e5c6160b017fabea43e (diff) | |
| download | histacom2-312cd741458d2cb3a9274b671ce7b55bcd680849.tar.gz histacom2-312cd741458d2cb3a9274b671ce7b55bcd680849.tar.bz2 histacom2-312cd741458d2cb3a9274b671ce7b55bcd680849.zip | |
WIndow Resize
Pulled Straight out of one of my old vb oses :laughing:
Diffstat (limited to 'TimeHACK.Engine/Template/WinClassic.cs')
| -rw-r--r-- | TimeHACK.Engine/Template/WinClassic.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/TimeHACK.Engine/Template/WinClassic.cs b/TimeHACK.Engine/Template/WinClassic.cs index 3f69115..ca55c59 100644 --- a/TimeHACK.Engine/Template/WinClassic.cs +++ b/TimeHACK.Engine/Template/WinClassic.cs @@ -66,6 +66,30 @@ namespace TimeHACK.Engine.Template Title.ForeColor = SaveSystem.currentTheme.inactiveTitleTextColor; } + private void right_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + this.Size = new Size(MousePosition.X - this.Location.X, this.Size.Height); + } + } + + private void left_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) + { + this.Size = new Size(this.Size.Width + (this.Location.X - MousePosition.X), this.Size.Height); + this.Location = new Point(MousePosition.X, this.Location.Y); + } + } + + private void bottom_MouseMove(object sender, MouseEventArgs e) + { + if (e.Button == MouseButtons.Left) { + this.Size = new Size(this.Size.Width, MousePosition.Y - this.Location.Y); + } + } + public bool max = false; private void maximizebutton_Click(object sender, EventArgs e) |
