RR
I tried the code copied from your email into a C# form and clicked on the
button with the mouse. The No button get the focus in the display of the
message box. There must be something else going on. There is nothing wrong
with the way the MessageBox is written or works in a test project.
Sorry, I can't be of more help.
Les Smith
See articles, free code, add-ins, books, general .NET info at
http://www.knowdotnet.com
"RajaRengham" <an*******@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
Hi all,
Please have a look at the following code. problem with this is,
when the button1_click is initiated by keyborad it works well. But when it
is initiated by mouse,focus on the default button is missing. Is there any
problem with MessageBox Class.
private void button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show("Message","Title",MessageBoxButton s.YesNo,MessageBoxIcon.Ast
erisk,MessageBoxDefaultButton.Button2);
}
Thanks in advance.
Regards,
RR.