Hello,
Windev 22
Need to close one MDI Window and switch (back) to another MDI Window.
Got two MDI Parent windows, with their own menu(s). Menu(s) do open other (Form & browse) window(s) with OpenChild command.
MDIWindow1 is opened after successful login. Here few menu(s) are there to enter few basic data. From here user could either close application or open MDIWindow2. This could be done, by passing one parameter, at Application init.
Now, from MDIWindow2, I want to give an option either to close application or open MDIWindow1 from a menu item (Switch). If the user clicks (Switch), then this MIDWindow2 need to be closed and MDIWindow1 to be opened.
Issue is, after closing MDIWindow2 and opening MDIWindow1, any openchild command doesn't show up in MDIWIndow1. If we check with WinStatus, it says that particular window is already open, but we could not view it. I think, the 'Parent' of the Child window is still set to MDIWindow2 and not with MDIWindow1, even though MDIWindow2 is closed.
Code in Switch menu item in MDIWindow2
IF WindowCount() > 1 THEN
Info("Close all open windows before proceeding.")
END
Open(MDIWindow1)
Close(MDIWindow2)
Is there any way to set the 'parent' of current openchild (command) to MDIWindow1 from MDIWindow2 ? Or any other way to accomplish this feature ?
Happiness Always
BKR Sivaprakash