private void btnTasks_Click(object sender, EventArgs e) { Hide(); var allTaskForm = new TasksList(); allTaskForm.ShowDialog(); Close(); }