mardi 24 mars 2015

C# How do I set up a form close event on MessageBox

I'm sure this is probably been asked many times, but I can't locate it. I have some code that opens messagebox based on two outcomes to a question, Right or Wrong. Currently, clicking okay on the messagebox returns to the form with the question. What I want is to have one of two actions occur, I just don't know where to start to make it happen.


If right, when messagebox closes I want the question to be refreshed. If wrong, I want the messagebox to close, perform as action (loop), and allow another try.


I can't find an event to control the messagebox form closing.


Can anyone share some advice? Thanks for your time.


Aucun commentaire:

Enregistrer un commentaire