c# - MessageBox closed event -
this question has answer here:
i have messagebox ok
button, although there's close button. in code can check dialogresult.ok
. how should check button user had pressed? if (messagebox("error") != dialogresult.ok)
or there's way? event, occures, when user closes messagebox?
you can way,
dialogresult result = messagebox.show("message", "tests", messageboxbuttons.okcancel); if (result == dialogresult.ok) { } else if (result == dialogresult.cancel) { }
Comments
Post a Comment