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)
{
// Kill ourself
Dispose();
}
else
{
// Do we have a manager for processing key messages?
if (ViewManager != null)
ViewManager.KeyDown(e);
}
}
// Let base class fire events
base.OnKeyDown(e);
}