protected override void OnKeyDown(KeyEventArgs e)
{
// Cannot process a message for a disposed control
if (!IsDisposed)
{
// If the user pressed the escape key
if (e.KeyData == Keys.Escape)
{
// Using the escape key should give a close reason of keyboard
_provider.ProviderCloseReason = ToolStripDropDownCloseReason.Keyboard;
}
}
// Let base class fire events
base.OnKeyDown(e);
}