[Migrated content. Thread originally posted on 05 April 2007]
Using version 5.2.1.1codefrag:
PERFORM X000-WINPRINT-INIT.
DISPLAY STANDARD WINDOW
LINES HT-SCREEN SIZE WI-SCREEN BACKGROUND-LOW.
DISPLAY SCREEN-1. ACCEPT SCREEN-1 ON EXCEPTION CONTINUE.
shows an inactive screen. You have to click on the screen to activate it.
Changing this to :
DISPLAY STANDARD WINDOW
LINES HT-SCREEN SIZE WI-SCREEN BACKGROUND-LOW.
PERFORM X000-WINPRINT-INIT.
DISPLAY SCREEN-1. ACCEPT SCREEN-1 ON EXCEPTION CONTINUE.
Fixes the problem - the screen is active.
So - the problem must be in X000-WINPRINT-INIT.
X000-WINPRINT-INIT SECTION.
X000-WINPRINT-INIT-START.
INITIALIZE WINPRINT-SELECTION.
CALL "WIN$PRINTER" USING WINPRINT-GET-NO-PRINTERS,
WINPRINT-SELECTION GIVING WINPRINT-NB-RESULT.
PERFORM X100-WINPRINT-CURRENT.
X000-WINPRINT-INIT-EXIT.
EXIT.
X100-WINPRINT-CURRENT SECTION.
X100-WINPRINT-CURRENT-START.
CALL 'WIN$PRINTER' USING WINPRINT-GET-CURRENT-INFO,
WINPRINT-SELECTION GIVING WINPRINT-NB-RESULT.
X100-WINPRINT-CURRENT-EXIT.
EXIT.
Commenting out the "PERFORM X100-WINPRINT-CURRENT." fixes the problem with the original codefrag (but doesn't get the current info, obviously.)
GET-CURRENT-INFO-EX produces similar results.
Since I can live with performing the procedure after the DISPLAY STANDARD WINDOW I'm not particularly concerned - just curious why the change would cause the screen to change between being active and inactive.
Anyone got any clues about this?



