diff options
Diffstat (limited to 'TimeHACK.Engine/Template/WinClassic.cs')
| -rw-r--r-- | TimeHACK.Engine/Template/WinClassic.cs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/TimeHACK.Engine/Template/WinClassic.cs b/TimeHACK.Engine/Template/WinClassic.cs index 1bd11e3..de88c1a 100644 --- a/TimeHACK.Engine/Template/WinClassic.cs +++ b/TimeHACK.Engine/Template/WinClassic.cs @@ -11,6 +11,10 @@ namespace TimeHACK.Engine.Template InitializeComponent(); } + public System.Drawing.Font fnt; + + public bool closeDisabled = false; + public const int WM_NCLBUTTONDOWN = 0xA1; public const int HT_CAPTION = 0x2; @@ -20,7 +24,7 @@ namespace TimeHACK.Engine.Template [DllImportAttribute("user32.dll")] public static extern bool ReleaseCapture(); - private void programtopbar_drag(object sender, MouseEventArgs e) + private void Programtopbar_drag(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { @@ -31,7 +35,7 @@ namespace TimeHACK.Engine.Template private void closebutton_Click(object sender, EventArgs e) { - this.Close(); + if (!closeDisabled) this.Close(); } public Boolean max = false; @@ -49,6 +53,7 @@ namespace TimeHACK.Engine.Template this.topleftcorner.Hide(); this.toprightcorner.Hide(); this.Dock = DockStyle.Fill; + this.WindowState = FormWindowState.Maximized; max = true; maximizebutton.Image = Properties.Resources.WinClassicRestore; } @@ -63,6 +68,7 @@ namespace TimeHACK.Engine.Template this.topleftcorner.Show(); this.toprightcorner.Show(); this.Dock = DockStyle.None; + this.WindowState = FormWindowState.Normal; max = false; maximizebutton.Image = Properties.Resources.WinClassicMax; } |
