protected override void OnResize(EventArgs e) { if (this.WindowState == FormWindowState.Minimized) { Minimize(); } }