8
Answers

date n time picker values error

ta mu

ta mu

10y
1.1k
1
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)