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

C# random value from dictionary and tuple -

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

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -