I have opened a form using Form.ShowDialogue() method, there are some decission making checks in the body of a button click event. The Problem is that whenever the button is clicked; form is closed after executing the possible if-else check where I showed a MessageBox using MessageBox.Show() method but I did not close it there, I tried debugging the code and found that cursor directly jumps to the end bracket of the form, from there the cursor jumps to the previous form where I called the victim form. I just used the following code for calling the form:
ChangePassword f = new ChangePassword();
f.ShowDialogue();
Remember I did not call the close method in the button click method but the form is closed after I press OK on messagebox.
Aucun commentaire:
Enregistrer un commentaire