Thought I'd put this down as it took me ages to search the Internet for this solution. In the end, I found it hidden away in the Autohotkey help file and not under the gui events...
The issue here is if you want to do something when 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% Return
- GuiSize:
- GuiControl, MoveDraw, MainRedBackground, w%A_GuiWidth% h%A_GuiHeight%
- Return
If I just used GuiControl, Move, ... then this would be as above but if you are using images, then you will get problems with the image repeating... so use moveDraw which redraws the app. This will result in flickering but it's better than if it isn't redrawing.