Q:

DateTimePicker DialogResult.OK

I have following code now:
var picker = new DateTimePicker();
var form = new Form();
form.Controls.Add(picker);
var result = form.ShowDialog();
if (result == DialogResult.OK)
{
    //Can´t acces this
}
if (result == DialogResult.Cancel)
{
    //Do when Form closed
}

When the form appears, there´s only picker on it, no buttons. Now I can only acces result == DialogResult.Cancel when I close the form. What I need to do to access branch with result == DialogResult.OK

A:

You can add 2 buttons OK and Cancel onto your form and handle the Click events properly. The point is you have to use the DialogResult property to close your form instead of the Close() method, like this:
//Click event handler for your OK button
private void OK_Click(object sender, EventArgs e){
    DialogResult = DialogResult.OK;
}
//Click event handler for your Cancel button
private void Cancel_Click(object sender, EventArgs e){
    DialogResult = DialogResult.Cancel;
}

Or simply you can use the DialogResult property of a Button (no need to add code to Click event handler):
buttonOK.DialogResult = DialogResult.OK;
buttonCancel.DialogResult = DialogResult.Cancel;

NOTE: All the above things work  only if you show your form using ShowDialog(). Otherwise, you have to close your form manually

