<doc>
        <legacy_id>2526</legacy_id>
        <name>shutdown</name>
        <type>message</type>

        <syntax>
                <example>shutdown</example>
        </syntax>

        <synonyms>
        </synonyms>

        <summary>Sent to the <glossary tag="current stack">current card of the defaultStack</glossary> when the <glossary tag="application">application</glossary> is quitting. </summary>

        <examples>
                <example>on shutdown</p><p>  save stack &quot;Preferences&quot;</p><p>  pass shutdown</p><p>end shutdown</example>
        </examples>

        <history>
                <introduced version="1.0">Added. </introduced>
                <deprecated version=""></deprecated>
                <removed version=""></removed>
                
        </history>

        <objects>
                <stack/>
        </objects>

        <platforms>
                <mac/>
                <windows/>
                <linux/>
          <ios/>
    <android/>
  </platforms>

        <classes>
                <desktop/>
                <server/>
                <web/>
          <mobile/>
  </classes>

        <security>
        </security>


        <classification>
                <category>Windows &amp; Dialog Boxes</category>
        </classification>

        <references>
                <command tag="quit">quit Command</command>
                <property tag="defaultStack">defaultStack Property</property>
                <message tag="suspend">suspend Message</message>
                <message tag="closeBackground">closeBackground Message</message>
                <message tag="closeCard">closeCard Message</message>
                <message tag="closeStack">closeStack Message</message>
        </references>

        <description>
        <overview>Handle the <b>shutdown</b> <keyword tag="message box">message</keyword> if you want to perform cleanup tasks before the <glossary tag="application">application</glossary> quits. </overview>

        <parameters></parameters>

        <value></value>
        <comments>The actual quit process is not triggered by the <b>shutdown</b> <keyword tag="message box">message</keyword>, so <glossary tag="trap">trapping</glossary> the <keyword tag="message box">message</keyword> and not allowing it to <control_st tag="pass">pass</control_st> does not prevent the <glossary tag="application">application</glossary> from quitting. </p><p></p><p>In standalones, some care is needed to ensure you receive the <b>shutdown</b> message if your application uses multiple stacks. The most reliable approach is to install a library stack or backscript to handle the message when your application starts up.</p><p></p><p><note>Applications will not receive this message when running in the IDE.</note></comments>
        </description>
</doc>