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