OS4 and maybe all systems based on MUI remembers the window old position, size when reopening.
On windows(tm) 10 there are two differences in that behaviour:
1. The window reopens at the center, not the previous position.
2. If the previous size was full size (with the full size gadget) after reopen the window will sticking out of the display.
Code: Select all
@REQUIRE "rapagui"
gui$=[[<?xml version="1.0" encoding="UTF-8"?>
<application id="szamlazz">
<window id="szamlawin" open="true" title="Számlázz" activate="false" notify="CloseRequest">
<vgroup>
<rectangle/>
<colgroup columns="3">
<rectangle/>
<button notify="pressed" id="reopen">Reopen</button>
<rectangle/>
</colgroup>
<rectangle/>
</vgroup>
</window>
</application>
]]
Function p_eventfunc(msg)
Switch msg.id
Case "szamlawin":
End
Case "reopen":
moai.set("szamlawin","Open",False)
Wait (10)
moai.set("szamlawin","Open",True)
EndSwitch
EndFunction
moai.CreateApp(gui$)
InstallEventHandler({RapaGUI = p_EventFunc})
Repeat
WaitEvent
Forever