How do i find if user clik "ok" on my Modal Dialog?
-
Or how to return parametr to main wnd, when my modal dialog is closing?
-
Or how to return parametr to main wnd, when my modal dialog is closing?
Set the OK button's DialogResult property to OK. Then use this code in the main/calling form. frmInput dlg = new frmInput(); if(dlg.ShowDialog(this) == DialogResult.OK) { // Code to run on OK }
-
Set the OK button's DialogResult property to OK. Then use this code in the main/calling form. frmInput dlg = new frmInput(); if(dlg.ShowDialog(this) == DialogResult.OK) { // Code to run on OK }
OK, it works, thanks. But it I need to get some data from my modal dialog? If I'm typing some string and after closing dialog i need to add this string into my listbox on main window? ===================== http://wasp.elcat.kg