The following How-to topics deal with Magic xpa's Main Program:
How Do I Initialize My Application?
How Do I Skip the Initialization Code?
How Do I Implement a Background /Wallpaper for My Application?
How Do I Set and Use Global Variables (per Context Only)?
How Do I Run a Certain Procedure Upon Application Invocation?
How Do I Run a Certain Procedure Upon Application Termination?