Microsoft KB Archive/79372

= How to Force Screen Repaint After CLS in Basic PDS UI Toolbox =

Article ID: 79372

Article Last Modified on 8/16/2005

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.1
 * Microsoft BASIC Professional Development System 7.0

-



This article was previously published under Q79372



SUMMARY
When you use the UIDEMO.BAS program to demonstrate the User Interface (UI) Toolbox and one of your choices from a menu executes a CLS statement, upon returning from that choice you must repaint the menu screen. Repainting is not done automatically. You can repaint by calling the MonoDisplay or ColorDisplay SUB procedures (Basic routines that are part of UIDEMO.BAS) right after you return. If you perform a CLS in one of your own programs that uses the User Interface Toolbox routines (GENERAL.BAS, WINDOW.BAS, MOUSE.BAS, and MENU.BAS), you will also need to refresh the screen as above.

NOTE: If you do not repaint the screen it may appear that your program has hung, as the keyboard will not respond and the mouse will not be visible. However, in this case, if press the ALT key, you will see the menu bar appear at the top of the screen.



Steps to Reproduce Behavior

 * 1) In QBX.EXE, load UIDEMO.BAS with all of its support files.
 * 2) Press F2, and choose to edit DemoAlert.
 * 3) Just after the comments at the top of the SUB, put in a CLS statement.
 * 4) Run the demo (Press ALT+F5).
 * 5) Under the Demo option, choose Alert Window.
 * 6) This should clear the screen (to white) and put the alert box on the screen.
 * 7) After closing the two boxes, you see that you have just a white screen. However, if you press ALT, the menu bar will appear.
 * 8) If you add a call to ColorDisplay at the bottom of DemoAlert, the screen will be repainted just before the SUB is exited. The same idea can be applied to any program written with the tools provided with UIDEMO.BAS, GENERAL.BAS, WINDOW.BAS, MOUSE.BAS, and MENU.BAS.

Additional query words: BasicCom 7.00 7.10 hang

Keywords: KB79372

-

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

© Microsoft Corporation. All rights reserved.