Microsoft KB Archive/73373

= CHAIN Without Run-time Resets SCREEN Mode and PALETTE Colors =

Article ID: 73373

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft QuickBasic 4.0
 * Microsoft QuickBASIC 4.0b
 * Microsoft QuickBasic 4.5 for MS-DOS
 * Microsoft BASIC Compiler 6.0
 * Microsoft BASIC Compiler 6.0b
 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q73373



SUMMARY
When CHAINing from a stand-alone program compiled with BC.EXE /O, any SCREEN mode or PALETTE colors set prior to the CHAIN statement will be reset to the default setting after CHAINing. If the programs are compiled using a run-time module (without the BC /O compiler option), then the PALETTE and SCREEN mode will be preserved across the CHAIN. This behavior is by design.



MORE INFORMATION
In a program compiled with BC.EXE /O and linked with a stand-alone library such as BCOM40.LIB, BCOM45.LIB, or with the PDS stand-alone libraries with BCL prefixes (such as BCL71ENR.LIB), the CHAIN statement acts much like the RUN statement, resetting any variables, palettes, or screen modes that may have been set in the CHAINing program.

In a program compiled without the /O option and linked with a run- time library such as BRUN40.LIB, BRUN45.LIB, or PDS libraries with BRT prefixes (such as BRT71ENR.LIB), the CHAIN command preserves the current screen mode, the current palette, and any COMMON SHARED variables shared by both the chaining and the chained-to programs.

Additional query words: QuickBas BasicCom 4.00 4.00b 4.50 6.00 6.00b 7.00 7.10

Keywords: KB73373

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.