close standalone with window-close button (X)


    May 29 2010 | 12:08 am
    Hi, maybe a newbie question:
    By default, standalone built by Max quits with File menu or Ctrl+Q (on windows)
    Is there a way to enable the red X button on right hand corner and close the application with it? now it's grayed out.
    Thanks!

    • May 29 2010 | 2:19 am
      If I understand what you want to do, you have to do a few things.
      First, you need to enable the window close button. This is done with a window message to thispatcher with a loadbang.
      You then need to tell Max that when the patcher is closed, you want close the app. You can do this with a closebang that triggers a message to Max:
    • Jul 22 2010 | 5:19 pm
      Hi to all
      I don't know if the method Ben proposes is a good one or has a bug. I tried this on Max 5.0.7, WinXP Professional 32-bit, and I had a problem. Ok, if you try to build a simple .exe application it will close just fine; however the application still runs if you check the Windows Task Manager under the Processes tab. So unless this has a workaround, I believe it can cause far more problems than to solve.
      All the best,
      Stav.
    • Jul 22 2010 | 5:35 pm
      Hi Stav,
      I can't repro here. Please update to 5.1.4: http://www.cycling74.com/downloads
      -Ben
    • Jul 23 2010 | 1:43 am
      [closebang]
      |
      ";max
      quit"
    • Dec 04 2012 | 4:50 pm
      Sorry to reignite an old topic. I've just been trying Ben's method on a standalone built from Max 5.1.9 and it works fine on a Windows 7 machine. However, on Windows XP, even though the application seems to close I get a Windows error message saying "MaxMSP has encountered a problem and needs to close. We are sorry for the inconvenience". It does not continue to run in the background if I check the task manager however.