I found a solution :)
Now I just need to make it store and restore the window position, which i've not quite managed yet.
user32.decls .lib "user32.dll" api_GetActiveWindow% () : "GetActiveWindow"
Function DetectMinimise() window=api_GetActiveWindow() If window<>myWindow If Not minimised minimised=True EndIf Else If minimised minimised=0 FreeImage menu Delay 250 Graphics 640,480,0,2 menu=LoadImage("ui\menu.jpg") For b=1 To 6 button(b)=LoadImage("ui\button"+b+".tga") Next EndIf EndIf End Function
Now I just need to make it store and restore the window position, which i've not quite managed yet.