Skip to content

Instantly share code, notes, and snippets.

@joebuschmann
Created December 18, 2014 20:18
Show Gist options
  • Save joebuschmann/3d4608cee4566a89d4e2 to your computer and use it in GitHub Desktop.
Save joebuschmann/3d4608cee4566a89d4e2 to your computer and use it in GitHub Desktop.
protected override bool ProcessDialogKey(Keys keyData)
{
// Suppress the accept button by preventing the parent form
// from processing the return key.
// Return false to indicate that the key press has not been
// handled and the child control should handle it.
if (keyData == Keys.Return)
return false;
return base.ProcessDialogKey(keyData);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment