Character menu to graphical window

Good Afternoon,

We have a character-based menu system that is launching a graphical program via CALL.  This creates a new window with the graphical screen in it.  When I exit this program though, the menu appears in the new window rather than that window closing and returning to the original window (which is still up in the background).  I don't know what I'm doing wrong or what I need to do differently in this case so that my menu continues to operate normally.

Currently, I am just calling DESTROY ALL CONTROLS and making sure to close all my files.

Thanks for any advice,


  • Verified Answer

    There are a few things going on here. I take it that the character-based menu system is a COBOL program run through AcuGT and run on Windows. If that is correct, the first time that a display statement occurs the AcuGT runtime creates a Window for your program. Then you do a call, does the called program display a Standard window, Floating window or Independent Window and at the end where you destroy all controls, do you close the Window handle

     DISPLAY Floating WINDOW, SIZE 29, LINES 12,

                  TITLE "Calculator", BACKGROUND-LOW,

                  HANDLE IN MAIN-WINDOW.

    display screen

    accept screen

    destroy all controls

    close window MAIN-WINDOW.

    It would be good to put a display window statement in the character-based menu system so that you can establish the handle of that window. From that point forward, your called programs call destroy their controls and close their window handles.

  • It appears that I was inadvertently skipping the close window and destroy all commands with a misplaced go-back.  I believe I have this situation in hand now, thank you for your time.