BobyIsProgress
Member
Hi guys,
I'm working on a multi-window application.
This is my scenario:
From my main window (we will call it "parent", I run another one (we will call it the "child") with the persistent option. The user can hide the child behind the parent and forget he already launched the child.
I'm working on a multi-window application.
This is my scenario:
From my main window (we will call it "parent", I run another one (we will call it the "child") with the persistent option. The user can hide the child behind the parent and forget he already launched the child.
Code:
DO:
/* Handle */
DEFINE VARIABLE hWctrw AS HANDLE NO-UNDO.
/* Logical */
DEFINE VARIABLE lFound AS LOGICAL INIT FALSE NO-UNDO.
hWctrw = SESSION:FIRST-PROCEDURE.
DO WHILE VALID-HANDLE(hWctrw) :
IF hWctrw:NAME MATCHES "*myChildWindow*" THEN DO:
lFound = TRUE.
LEAVE.
END.
hWctrw = hWctrw:NEXT-SIBLING.
END.
IF lFound = TRUE THEN DO:
hWctrw:MOVE-TO-TOP().
END.
ELSE
RUN myChildWindow.w PERSISTENT (some value).
END.