Problem in focusing default button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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",MessageBoxButtons.YesNo,MessageBoxIcon.Asterisk,MessageBoxDefaultButton.Button2)



Thanks in advance

Regards
RR.
 
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 said:
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.
 
Back
Top