.net - How to return the result of dialog window work in the moment of its closing? -


everyone knows messagebox.show() method, returns dialogresult value after dialog closed. how can implement such method in dialog class?

class mydialog : form {

public static mydialogresult show() {}; 

}

the problem, can guess, method returns value after user clicks button in dialog.

you can set dialogresult property on button. if button clicked specified value returned showdialog() method.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -