.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
Post a Comment