c# - Exit application by clicking button on mainform when already pop up form is running -


form2 user confirmation window,i want close application stop button on mainform,but form2 active , there no dependency between form2 , mainform.how close application ?

you must opening form2 using showdialog() method. instead of use show() method , on mainform button's click event call application.exit() method


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -