/// <summary> /// Recieves a form and an integer value representing the operation to perform when the closing /// event is fired. /// </summary> /// <param name="form">The form that fire the event.</param> /// <param name="operation">The operation to do while the form is closing.</param> public static void CloseOperation(System.Windows.Forms.Form form, int operation) { switch (operation) { case 0: break; case 1: form.Hide(); break; case 2: form.Dispose(); break; case 3: form.Dispose(); System.Windows.Forms.Application.Exit(); break; } }
private void Dtg_Frm_Shw(System.Windows.Forms.Form myctl, bool myshw) { if (myshw) myctl.Show(); else myctl.Hide(); }