ta mu

ta mu

  • NA
  • 201
  • 78.9k

object

Sep 22 2013 11:36 AM
 i have this code on a form alarm.
 public DateTime mytime;
 private void button1_Click(object sender, EventArgs e)
        {
            mytime = monthCalendar1.SelectionStart.AddHours(dateTimePicker1.Value.Hour).AddMinutes(dateTimePicker1.Value.Minute).AddSeconds(dateTimePicker1.Value.Second);
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
           
            if (mytime.CompareTo(DateTime.Now) < 0)
            {
                this.Show();

            }
        }
but when i try to access the controls of alarm form on other form edit. i created the object of alarm form. when i run program and com to edit form
the alarm form displayed automatically. whey this is hepninig.

i just write this code on edit form
 alarm adrr = new Alarm();

Answers (1)