Skip down to the part of the code marked Control Triggers. Here you find the trigger blocks you defined for the buttons. Before these button triggers, there are a couple of standard AppBuilder-generated triggers to capture window events. Take a look at the second window trigger block:

ON WINDOW-CLOSE OF CustWin /* Customers and Orders */
DO:
  /* This event will close the window and terminate the procedure.  */
  APPLY "CLOSE":U TO THIS-PROCEDURE.
  RETURN NO-APPLY.
END.
Note: The :U tag that follows the quoted string tells the compiler to leave this string out of its list of strings that might be sensible to translate into other human languages. Since the word CLOSE is just part of the program logic and not something a user would ever see or want to see in a different language, it should never be translated.

WINDOW-CLOSE is one of those events like the CHOOSE event for a button. Remember that each type of object has its own set of events it can capture. WINDOW-CLOSE, logically enough, is the event that a window receives when it is closed, for example, by clicking the standard close-window box in the corner of the window.

The code then cascades this event down to the running procedure itself, by applying the CLOSE event to the procedure. There is a special built-in function that always holds the handle of the currently running procedure: THIS-PROCEDURE. The APPLY statement makes an event happen just as a user action would. The event in this case is the CLOSE event for the procedure. Keep this in your mind for a few moments, and you soon see what the CLOSE event does.

The RETURN NO-APPLY statement just means: “Skip whatever action was in the queue of user interface actions, because we are getting out anyway.”