using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Security.Policy; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace OnDoc.Diverses { public partial class frmCalendar : Form { public DateTime res; public frmCalendar() { InitializeComponent(); } private void frmCalendar_Load(object sender, EventArgs e) { sfCalendar1.SelectedDate= DateTime.Now; } private void btnOK_Click(object sender, EventArgs e) { DialogResult = DialogResult.OK; } private void sfCalendar1_DoubleClick(object sender, EventArgs e) { DialogResult= DialogResult.OK; } } }