Visual studio 2013 and app on window close issue

close the app with the esc key or clicking on the [x] button didn’t work,the app window still open,have to click the [x] button twice to enable shutdown the app window, but this only happened with released mode,not in debug.
any ideas?

ok,its poco issue,now its working fine.sorry for flooding