Highlighted
Absent Member.
Absent Member.
1200 views

[archive] Window Focus Issue

[Migrated content. Thread originally posted on 18 January 2006]

We have a menuing system that calls a new occurance of the runtime as it opens new program windows. we are having an issue that if you click to run the "call" of the runtime unit, and then click again on the active window, the "called" window appears behind the active window. Is there a way to force new windows to have focus in front.
0 Likes
5 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Window Focus Issue

What function do you use to spawn the new instance of the runtime? C$SYSTEM?`
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Window Focus Issue

c$run
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Window Focus Issue

Can you provide a small example? I mean, there is no need for your menu system, obviously a call "c$run" will do to reproduce?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Window Focus Issue

STRING "WRUN32.EXE -W -C " CONFIG-FIL " MENURUN "
L " " TRAINFLAG DELIMITED SIZE INTO CALL-STR.
CALL "C$RUN" USING CALL-STR.

*****AND IN MENURUN IT CREATES THE FOLLOWING WINDOW:

DISPLAY INDEPENDENT WINDOW LINES 25.0
SCREEN LINE 1 SCREEN POS 1 ACU30
SIZE 80 CELL HEIGHT = WCELL-HEIGHT
AUTO-MINIMIZE
TITLE-BAR
MODELESS
HANDLE IN CALL-WINDOW.

*****WHILE THE WINDOW IT PROCESSING IF YOU ACTIVE THE WINDOW IT WAS CALLED FROM THE NEW WINDOW APPEARS BEHIND THE INITIAL PROGRAMS WINDOW
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Window Focus Issue

I am not sure I get this right, I have tried to reproduce your issue but if I run this, and click on the slave window, it remains there.

       IDENTIFICATION               DIVISION.
       PROGRAM-ID.                  MASTER.
       WORKING-STORAGE SECTION.

       77  CNTL-FONT                USAGE HANDLE OF FONT SMALL-FONT.

       PROCEDURE DIVISION.
       MAIN-LOGIC.

           DISPLAY STANDARD         GRAPHICAL WINDOW
                   TITLE            "Master"
                   CONTROL          FONT CNTL-FONT
                   SIZE             40
                   LINES            15
                   BACKGROUND-LOW.
           ACCEPT  OMITTED.
           CALL    "c$run"          using "wrun32.exe slave".
           ACCEPT  OMITTED.
           STOP    RUN.


       IDENTIFICATION               DIVISION.
       PROGRAM-ID.                  SLAVE.
       WORKING-STORAGE SECTION.

       PROCEDURE DIVISION.
       MAIN-LOGIC.

           DISPLAY INDEPENDENT      WINDOW
                   LINES            25.0
                   SCREEN LINE      1
                   SCREEN POS       1
                   SIZE             80
                   AUTO-MINIMIZE
                   TITLE-BAR
                   MODELESS.

           ACCEPT  OMITTED.
           GOBACK.


Can you reproduce with this code?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.