If you use the following code snippet, once you click one of the buttons, immediately pressing the Spacebar will close the message as if the button was clicked:
private void radButton1_Click(object sender, EventArgs e)
{
RadMessageBox.Show("Test", "Caption", MessageBoxButtons.OK);
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Test", "Caption", MessageBoxButtons.OK);
}
However, if you switch to the following approach, once you click one of the buttons, immediately pressing the Spacebar will close the standard MS MessageBox as if the button was clicked, but the RadMessageBox wouldn't be closed because the message doesn't have focus.
private void radButton1_Click(object sender, EventArgs e)
{
RadMessageBox.Show(this, "Test", "Deployment Result", MessageBoxButtons.OK, RadMessageIcon.Info);
}
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show(this, "Test", "Deployment Result", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
No matter how the RadMessageBox is shown, it is expected to have focus to the message button by default.
Workaround:
this.TopMost = true;
RadMessageBox.Show(this, "Test", "Deployment Result", MessageBoxButtons.OK, RadMessageIcon.Info);