diff -r 013e148e8f12 -r 9549c46bebb1 GUI/MainForm.cs --- a/GUI/MainForm.cs Sun Jan 15 15:35:03 2012 +0000 +++ b/GUI/MainForm.cs Sun Jan 15 22:06:59 2012 +0000 @@ -16,7 +16,7 @@ The Initial Developer of the Original Code is Michael Möller . - Portions created by the Initial Developer are Copyright (C) 2009-2011 + Portions created by the Initial Developer are Copyright (C) 2009-2012 the Initial Developer. All Rights Reserved. Contributor(s): Paul Werelds @@ -657,10 +657,10 @@ const int SC_CLOSE = 0xF060; if (minimizeToTray.Value && - m.Msg == WM_SYSCOMMAND && m.WParam.ToInt32() == SC_MINIMIZE) { + m.Msg == WM_SYSCOMMAND && m.WParam.ToInt64() == SC_MINIMIZE) { SysTrayHideShow(); - } else if(minimizeOnClose.Value && - m.Msg == WM_SYSCOMMAND && m.WParam.ToInt32() == SC_CLOSE) { + } else if (minimizeOnClose.Value && + m.Msg == WM_SYSCOMMAND && m.WParam.ToInt64() == SC_CLOSE) { /* * Apparently the user wants to minimize rather than close * Now we still need to check if we're going to the tray or not