Assuming guisize is required, the following result was found.
a user resizes your program. If you search and search, you'll find that GuiClose responds to when you close the app, and GuiSize will run when you resize the app. Syntax: GuiSize: GuiControl, MoveDraw, MainRedBackground, w%A_GuiWidth% h%A_GuiHeight%...