using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace SelM { public partial class FormDate : Form { public FormDate() { InitializeComponent(); } public bool isSelected = false; private void monthCalendar1_DateSelected(object sender, DateRangeEventArgs e) { isSelected = true; this.Hide(); } private void Form2_Activated(object sender, EventArgs e) { isSelected = false; } } }