Everyone knows the MessageBox.Show() method, that returns DialogResult value after dialog closed. How can I implement such a method in my dialog class?
class MyDialog : Form {
public static MyDialogResult Show() {};
}
The problem, as you can guess, is that the method returns a value only after user clicks some button in the dialog.