c# - Winform Return Result -


i check if actions have done winform, done successfully.

mainform form = new mainform(); form.show(); //continue in case form returns true 

how can return , check value after winform closed?

you have use dialogresult that:

mainform form = new mainform(); dialogresult result = form.showdialog();  if (result == dialogresult.ok) { } else { } 

you have set dialogresult of form, example using button click event handler:

private void button1_click(object sender, eventargs e) {     this.dialogresult = dialogresult.ok; } 

Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -