MMCC MASTHEAD


CONTENTS

v1.10
Mid-Michigan Computer Consultants, Inc.
509 Center
Bay City, Michigan

Sales (989) 892-9242             Support (989) 686-8860

Visual PL/B Language

DOS Style Screens

CONVERSION STRATEGY
A common strategy for moving DOS based, character mode, PL/B programs to the Windows environment is to simply recompile the programs with the PLBWIN compilers and then run them under the PLBWIN runtime.

That's all there is to it!

Although the programs work, they look almost the same as the old programs did. The next objective is to convert the programs to true GUI style. This can be done one piece at a time which makes the transition relatively painless.
SPECIAL NOTES:
WINSHOW: You must be sure that a WINSHOW instruction has been issued before you try a DOS style program that includes any KEYIN. If you have NOT issued a WINSHOW and get to a KEYIN, the runtime just bounces your entire session and it's over.

As a practice, we include a WINSHOW at the beginning of EVERY DOS style program. If we have a Windows style menu on top of the syste we do a WINHIDE there after returning from any program.

FONTS: Although character mode program work the same under PLBWIN, they do not LOOK the same. This is simple to resolve using two techniques:
  • PLBWIN.FON is a font file distributed under the name PLBWIN.FXX. Simply rename this .FXX file to .FON and insure that it's available to all programs which require it.

  • There's also a keyword to place in your ini file:
          PLBWIN_DOSCOLORS=ON
    Not sure what the effect is.


COLORS may also seem different when DOS programs are recompiled and run under PLBWIN. A PLBWIN INI file setting resolves this as follows:
      PLBWIN_COLORS={ON | OFF}

CURSOR FORMAT: For simple recompiles of a program, the cursor may seem to disappear. What happens is that it's represented as a skinny verticle bar that is all but invisible.

You can change the cursor to something more acceptable by using the SETMODE statement in your program to make a BLOCK style cursor. We usually do this immediately after the WINSHOW instruction at the beginning of the program.

   SETMODE *CARET=BLOCK

TAB KEY TRAPPING We hit a problem with the TAB key. Our programs follow every KEYIN with a canned routine that tests all of the possible control keys and sets a flag. The TAB key was never sensed by this routine on PLBWIN versions of DOS programs.

The problem is that Sunbelt made a decision concerning the TAB key and how it related to the CANCEL key on old Datapoint Terminals. Both of the keys trapped the same and the CANCEL came first.

This can be changed by altering the ANSI.DEF control file. That's the PLBWIN version of the old SUNDB86A SUNSCRN.DEF file.
  • For PLBWIN you use the program MAKEDEF.EXE (which can be run from the command line) to change the ANSI.DEF settings.

  • For 86A you used TESTCRT.EXE to change the SUNSCRN.DEF file
    You could also use SETDRIVE.EXE to just set the drive search rules in the same file.
To fix the TAB key, you need to run the MAKEDEF.EXE program and change ANSI.DEF file in the folder where it's found for runs.

Run the program and drill down to the "Change any simple terminal control strings" line, as follows:
 C:\Sunbelt\plbwin.85\code>makedef .\ansi.def

Sunbelt Screen Definition File Editor   Version 8.5    16 N
(C) Copyright 1987-2000   Sunbelt Computer Systems, Inc   N

Using .\ansi.def as the screen definition file name.

Would you like instructions?                     [y or N]:
Toggle subwindow emulation (currently 'y')?      [y or N]:
Toggle Color Screen Support (currently 'y')?     [y or N]:
Change any simple terminal control strings?      [y or N]:
At this point you need to drill down to the CANCEL key. Answer "Y" to the "change" question then enter 0xFF as the new character value. For example:
Change any simple terminal control strings?      [y or N]: y
---------------------------------------------------------
Current value: h08
Change Backspace character?                      [y or N]:
Current value: h09
Change Cancel character?                         [y or N]: y
KEY: 0xFF

CONTENTS

v1.10
Send e-mail to MMCC.

Write to MMCC Technical Support at:
MMCC, Inc.
600 W. Midland
Bay City, MI 48708
(989) 686-8860
| Home   |

© 1997 MMCC, Inc. All Rights Reserved.

Report problems or suggestions to support@mmcctech.com