Microsoft KB Archive/45691

= Compiled PICTURE ON Statement Renders WINDOW Border Invisible =

Article ID: 45691

Article Last Modified on 11/21/2006



This article was previously published under Q45691



SUMMARY
In an application compiled in QuickBASIC Version 1.00 for the Apple Macintosh, executing a PICTURE ON statement (with no subsequent PICTURE OFF statement) prior to a WINDOW statement may cause problems such as loss of window borders and background, or even system bombs.

If your program invokes PICTURE ON, it must always invoke PICTURE OFF before activating another window with a WINDOW statement.



MORE INFORMATION
The PICTURE ON and PICTURE OFF statements were intended to capture output sent to the one current window. This means that changing the current window with another WINDOW statement before you use PICTURE OFF will not capture subsequent output to that window and may cause problems such as loss of graphics, systems bombs, or disabling of MultiFinder. The following program demonstrates the incorrect use of PICTURE ON, PICTURE OFF, and WINDOW:

Code Example
PICTURE ON SHOWPEN   ' IF THIS LINE IS REMOVED, THE WINDOW WILL BE           ' INVISIBLE WHEN COMPILED

WINDOW 1,&quot;&quot;,(30,50)-(476,309),2

REM THE CODE BELOW SHOWS THE CAPTURE DID NOT WORK PRINT &quot;hi&quot; CIRCLE (50,100),50 PICTURE OFF image$=PICTURE$ WINDOW 2  ' Invokes default Untitled window size and type. PICTURE (30,50)-(476,309) ,image$ CLOSE 1 WHILE INKEY$=&quot;&quot;:WEND STOP To correct this program, move the first two statements, PICTURE ON and SHOWPEN, to be right after the WINDOW 1 statement.

Additional query words: MQuickB

Keywords: KB45691

-

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

© Microsoft Corporation. All rights reserved.