public static void ShowHide(this System.Windows.Forms.Control ctrl) { if (ctrl.Visible) { ctrl.Hide(); } else { ctrl.Show(); } }