Something tells me that there is a single-method way of accomplishing this. When you click the button that is designated as the cancel button, the form automatically acts as if it has been dismissed, but for the OK, you have to put in its click handler:
private void btnOK_Click(object sender, System.EventArgs e)
{
DialogResult = DialogResult.OK;
Hide();
}
Is there a better way of doing it?