Form1.cs 860 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. namespace WindowsFormsMonthCalendar
  11. {
  12. public partial class Form1 : Form
  13. {
  14. public Form1()
  15. {
  16. InitializeComponent();
  17. }
  18. private void label2_Click(object sender, EventArgs e)
  19. {
  20. }
  21. private void Form1_Load(object sender, EventArgs e)
  22. {
  23. textBox1.Text = monthCalendar1.TodayDate.ToString();
  24. }
  25. private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
  26. {
  27. textBox2.Text = monthCalendar1.SelectionStart.ToString();
  28. textBox3.Text = monthCalendar1.SelectionEnd.ToString();
  29. }
  30. }
  31. }