programming x button to close
hello want know how can programming x button message box confirm close
hi dereklouis,
are trying messagebox confirm exit winform? if please write below code form's formclosing event. hope helps you.
private void form1_formclosing(object sender, formclosingeventargs e) { if (messagebox.show("exit or no?", "confirm exit", messageboxbuttons.yesno, messageboxicon.information) == dialogresult.no) { e.cancel = true; } }
thanks,
sabah shariq
please remember mark replies answers if help. if post helpful please vote
Learning > Small Basic
Comments
Post a Comment