M
Mukesh
Hi
I just fould a issue with MessgeBox. When i show the messagebox in my
app. Now if the user click any where else on the form out of messagebox. The
click event is kind put in a que. Now if there is a button or other control
where that person clicked, the button / control click event is fired after
my earlier procedure has finished.
Here is how you can duplicate the thing.
- Create a windowsform, put a button control on it,
- Write a procedure onClick event of button
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles button1.Click
MessageBox.show("Test", "Test", MessageBoxButtons.OKCancel,
MessageBoxIcon.Question, MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly)
End Sub
- Now Build and run the app
- Click the button
- {move the Messagebox out of the way, so you can see the button}
- click on the button again
- now click any button on the Messagebox
- {Now here is the problem} you will see the message box again. {message box
for second click}
can some tell how disable this feature in my app. or work around.
i have tried disabling the control and also form before displaying the
messagebox but still the same problem.
Can anybody help
Thanks in advance
mk
I just fould a issue with MessgeBox. When i show the messagebox in my
app. Now if the user click any where else on the form out of messagebox. The
click event is kind put in a que. Now if there is a button or other control
where that person clicked, the button / control click event is fired after
my earlier procedure has finished.
Here is how you can duplicate the thing.
- Create a windowsform, put a button control on it,
- Write a procedure onClick event of button
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles button1.Click
MessageBox.show("Test", "Test", MessageBoxButtons.OKCancel,
MessageBoxIcon.Question, MessageBoxDefaultButton.Button1,
MessageBoxOptions.DefaultDesktopOnly)
End Sub
- Now Build and run the app
- Click the button
- {move the Messagebox out of the way, so you can see the button}
- click on the button again
- now click any button on the Messagebox
- {Now here is the problem} you will see the message box again. {message box
for second click}
can some tell how disable this feature in my app. or work around.
i have tried disabling the control and also form before displaying the
messagebox but still the same problem.
Can anybody help
Thanks in advance
mk