c# - MessageBox closed event -


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

Popular posts from this blog

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

jsf - "PropertyNotWritableException: Illegal Syntax for Set Operation" error when setting value in bean -

arrays - Algorithm to find ideal starting spot in a circle -