/// <summary>Minimizes the form.</summary> /// <param name="form">The form.</param> public void MinimizeForm(Form form) { if (form == null) { form = ParentForm; } form.WindowState = FormWindowState.Minimized; MinimizeClick?.Invoke(new ControlBoxEventArgs(form)); }
/// <summary>The OnMinimizeClick.</summary> /// <param name="sender">The sender.</param> /// <param name="e">The event args.</param> protected virtual void OnMinimizeClick(object sender, EventArgs e) { ParentForm.WindowState = FormWindowState.Minimized; MinimizeClick?.Invoke(new ControlBoxEventArgs(ParentForm)); }