Hello,
I have a sample project (derived from a more complex one) in which the response window "w_resp_1" has a button "cb_1" whose "clicked" event opens another response window named "w_resp_2".
In the "Open" event of "w_resp_2" there is this MessageBox statement:
MessageBox(“Info”, “w_resp_2 opening…”)
If I run the project, after closing the MessageBox the "w_resp_2" window appears over the "w_resp_1", but the active window remains "w_resp_1".
As a walkaround in "w_resp_2" I created the user event "ue_manage" in which I moved the MessageBox statement, and in the "Open" event I inserted only:
PostEvent(“ue_manage”)
In this way I noticed that the active window after closing the MessageBox is correctly "w_resp_2".
I was wondering if there is another way to solve this problem… Is there a statement that forces the "w_resp_2" to be the active window?
I already tried this code in the "Open" event of "w_resp_2":
MessageBox(“Info”, “w_resp_2 opening…”)
PostEvent(“activate”)
and this one too:
MessageBox(“Info”, “w_resp_2 opening…”)
ParentWindow().PostEvent(“deactivate”)
but they don’t function (the active window is still "w_resp_1")
Thank you