The scenario where I noticed the problem was that I had multiple files in the queue and I was working on a huge file that needed a long time to finish. I wanted to skip it and encode the rest but the program closed entirely. I think any alternate behavior would be better, like spawn new flac.exe process and continue encoding the next file or just remain open with the queue and let user reclick appropriate buttons.
I just found out I can't get it to work like this. First, I can't let it skip a single file because I pass files in batches of 50 files at a time to flac.exe. If I wouldn't do that, the console window gets full of
flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.
which I really don't want. Second, trying to 'catch' clicking the close button on the command line is not possible when using Windows Forms. The link provided by robert only works for C(++) console applications, when using Windows Forms I can only use http://msdn.microsoft.com/en-us/library/sy...enthandler.aspx