The information in this article applies to:
- Microsoft FoxPro for Windows, versions 2.5, 2.5a, and 2.5b
- Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a, and 2.5b
- Microsoft FoxPro for Macintosh, version 2.5b
SUMMARY
When you are generating a screen set with multiple screens in the Screen
Builder, you may want to hide the deactivated screens until they are
needed. If the other screens are not hidden, they will appear on the
desktop unless the activated window is large enough to keep them from being
seen. Below is the code needed to hide any two deactivated screens of a
three-window screen set.
MORE INFORMATION
- Create a screen called SCR_ONE.
- From the Screen menu, choose Layout. In the Name box, type "firstscr"
(without quotation marks). If you are using FoxPro for Windows or
Macintosh, click the Code button, and then click On Window Activate.
If you are using FoxPro for MS-DOS, select the Activate check box. In
this box, type:
HIDE WINDOW secondscr
HIDE WINDOW thirdscr
- From the Screen menu, choose Layout. If you are using FoxPro for
Windows or Macintosh, click the Code button again and click the Screen
Setup Code button. If you are using FoxPro for MS-DOS, click the Setup
check box. Type the following code:
abc=.F.
This variable will be used to keep SCR_ONE from being hidden when
the program starts up.
- Create a push button with the prompts "SCREEN2" and "SCREEN3" (without
quotation marks). Give it the variable name "m.scr1" (without
quotation marks). In the VALID clause of the push button, type this
code:
DO CASE
CASE m.scr1 = 1
_CUROBJ=OBJNUM(m.scr2)
CASE m.scr1 = 2
_CUROBJ=OBJNUM(m.scr3)
ENDCASE
abc=.T.
- Create a screen called SCR_TWO.
- Repeat step 2, and in the Name box type "secondscr" (without quotation
marks). In the Activate box, type:
IF abc =.T.
HIDE WINDOW firstscr
ENDIF
HIDE WINDOW thirdscr
- Create a push button with the prompts "SCREEN1" and "SCREEN3" (without
quotation marks). Give it the variable name "m.scr2" (without
quotation marks). In the VALID clause of the push button, type this
code:
DO CASE
CASE m.scr2 = 1
_CUROBJ=OBJNUM(m.scr1)
CASE m.scr2 = 2
_CUROBJ=OBJNUM(m.scr3)
ENDCASE
- Create a screen called SCR_THRE.
- Repeat step 2, and in the Name box, type "thirdscr" (without quotation
marks). In the Activate box, type:
IF abc =.T.
HIDE WINDOW firstscr
ENDIF
HIDE WINDOW secondscr
- Create a push button with the prompts "SCREEN1" and "SCREEN2" (without
quotation marks). Give it the variable name "m.scr3" (without quotation
marks). In the VALID clause of the push button, type this code:
DO CASE
CASE m.scr3 = 1
_CUROBJ=OBJNUM(m.scr1)
CASE m.scr3 = 2
_CUROBJ=OBJNUM(m.scr2)
ENDCASE
- Bring up SCR_ONE, and choose Generate from the Program menu. Add
SCR_TWO and SCR_THRE to the screen set, and then generate the set.
- In the Command window, type "do scr_one.spr" (without quotation marks).
The screens will flash up one at a time. In FoxPro for Windows or
Macintosh, this flashing may be more noticeable than it is FoxPro for
MS-DOS; nothing can be done about it. SCR_ONE will settle on the screen
along with the SCREEN2 or SCREEN3 push buttons. If you choose one of these
push buttons, SCR_ONE will be hidden and whichever screen is chosen will
appear.
For more information about how to keep the screens from flashing when the
screen set starts up, please see the following article(s) in the Microsoft
Knowledge Base:
ARTICLE-ID: Q119692
TITLE : How to Keep Screens from Flashing in Multiple-Screen
Set
|