Resolved Number of window app runing

#1
Hi,

On one of my project, I have a main app where the user can run other window app. But for one of this window we want to put a limit of two apps runing in the same time. My issue is that I don't know how many window app are runing at any time... Do you have any idea or method to do it ?

The process is like this.
1. runing the main app
2. runing a sub window app from the main app
3. runing the same sub window app from the main app
4. closing one the sub window
5. How do I know in the main app that one of the sub app is closed or that only one sub app is runing?




Best Regards,

(Open edge 10.2B)
 
#2
Hi a little update:

I find this way:

Code:
    DEFINE VARIABLE iCmpt AS INTEGER     NO-UNDO.
    DEFINE VARIABLE hHandle AS HANDLE      NO-UNDO.
    hHandle = SESSION:FIRST-PROCEDURE.
    DO WHILE hHandle <> ?:
        IF TRIM(hHandle:FILE-NAME) = "myFile" THEN
        iCmpt = iCmpt + 1.
        IF icmpt = 5 THEN
            LEAVE.
        hhandle= hhandle:NEXT-SIBLING.
    END.

      MESSAGE iCmpt
          VIEW-AS ALERT-BOX INFO BUTTONS OK.
 
Top