Skip to main content

Problem:

This application demonstrates a method of using both Dialog System GUI screensets and character based console screens within the same application.

Resolution:

INTRODUCTION

==========

This application demonstrates a method of using both Dialog System GUI screensets and character based console screens within the same application.

The program PROG1.EXE is the main executable which is linked as a character based application. (Look in IDE/Project/Build Settings/Link/ General). The program SHOWCONSOLE is a subprogram whose .OBJ file is linked into both PROG1.EXE and PROG2.DLL. It contains the following callable entry points:

      - "hideconsole": hide the console window which is created when PROG1.EXE is started.

         Everytime this entry point is called the window will be hidden.

      - "showconsole": make the console window visible and then make it the Active window.

      - "delconsole" : Remove the console window by freeing it from the application. This should be

         done prior to ending the application with a STOP RUN.

PROG1.EXE starts and immediately calls "hideconsole". It will then display a GUI window in the Dialog System screenset PROG1.GS. From this window you can press a button which will either call PROG2.DLL or Quit. PROG2.DLL will call "showconsole" and will then display a character based screen. From this screen you can select option number "1" which will call PROG3.DLL or option number "9" which will return to PROG1.EXE. PROG3.DLL will display a GUI window in the Dialog System screenset PROG3.GS. From this window you can press a button which will return control to PROG2.DLL which will redisplay its console menu.

REQUIREMENTS:

==========

This demonstration can be run on any Net Express 3.1 or higher.

OPERATION:

========

It can be run from a Net Express command prompt from the DEBUG directory by typing PROG1.EXE. It can also be run from Windows Explorer or from within the IDE or Animator.

NOTE:

====

The main program MUST be linked as a character-based console application in order for the application to work correctly. This is because it uses Windows API calls in order to control the console window. These calls will not work when using a Net Express COBOL Text Window.

==========================================================

Keywords: demonstration, sample, example, demo, Dialog System, guichar.zip

demo.ex

demo.ne

Attachments:

guichar.zip

Old KB# 4226