ta mu

ta mu

  • NA
  • 201
  • 81.4k

date n time picker values error

Aug 10 2013 12:33 AM
i m using this code and getting error whats wrong


 if (sl.ShowDialog() == DialogResult.OK)
  {
  mytime = sl.monthCalendar1.SelectionStart.AddHours(sl.dateTimePicker1.Value.Hour).AddMinutes(sl.dateTimePicker1.Value.Minute).AddSeconds(sl.dateTimePicker1.Value.Second);
  this.Visible = false;
  } }

  private void timer1_Tick(object sender, EventArgs e)
  {
  if (mytime.CompareTo(DateTime.Now) < 0)
  {
  this.Visible = true;
  }
  }


Error  1  'login.select_values' does not contain a definition for 'dateTimePicker1' and no extension method 'dateTimePicker1' accepting a first argument of type 'login.select_values' could be found (are you missing a using directive or an assembly reference?)

Answers (8)