<p>At the moment I have setup a custom ok cancel dialog with a drop down in c#. The ok and cancel buttons use the DialogResult property so no code behind it. What I now need to do is validate the drop down to check it isn't left empty before posting back a dialogresult.</p>

<p>Is this possible?</p>

From
here
Double-click the  Closing field, and implement it as follows:
```
```
private void Second_Closing(object sender, 
        System.ComponentModel.CancelEventArgs e)
{
    // When the user attempts to close the form, don't close it...
    e.Cancel = (dropdown.selecteditemindex >= 0);
}
```
```