开发者

Finding out if the user manually closed the console window by clicking the red X in C#

I'm working on a project that calls a console window to process some data based on passed in arguments. What I would like to know is how I can check to see if the user clicked on the red X within the console app.开发者_JAVA技巧 Is there an event I need to handle? Any advice would be greatly appreciated. This is being done using the .NET framework 3.5 using VS2005. Thanks.


Use SetConsoleCtrlHandler, C# example here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜