How the Menu Font Is Determined in FoxPro for WindowsLast reviewed: April 29, 1996Article ID: Q103601 |
The information in this article applies to:
SUMMARYUser-defined menus that are not created as a part of _msysmenu will be displayed in the MS Sans Serif font unless the current output window's font is FoxFont, in which case FoxFont will be used. Below are three code examples that demonstrate this behavior and one example related to cross-platform applications. Menus that are created as part of _msysmenu will always be displayed in MS Sans Serif; for example:
DEFINE PAD test OF _msysmenu PROMPT "Test"
ON PAD test OF _msysmenu ACTIVATE POPUP test
DEFINE POPUP test
FOR CNT = 1 TO 10
DEFINE BAR CNT OF test PROMPT "test" + LTRIM(STR(CNT))
ENDFOR
MORE INFORMATION
Sample 1
DEFINE MENU test
DEFINE PAD mypad OF test PROMPT "My Pad"
ON PAD mypad OF test ACTIVATE POPUP test
DEFINE POPUP test
FOR CNT = 1 TO 10
DEFINE BAR CNT OF test PROMPT "test" + LTRIM(STR(CNT))
ENDFOR
ACTIVATE MENU test NOWAIT
Sample 2
DO WHILE .T.
@ 2,2 PROMPT "test1"
@ 2,12 PROMPT "test2"
MENU TO x
ENDDO
Sample 3
DIMENSION arr(10)
FOR CNT = 1 TO 10
arr(CNT) = "test" + LTRIM(STR(CNT))
ENDFOR
@ 2,2 MENU arr,10
READ MENU TO VAR
Cross-Platform ApplicationsIf you are developing applications that are to be run on both the MS-DOS and Windows platforms using the same code but without using platform-specific conditional statements, set the output window to FoxFont to ensure portability. If you are using platform-specific statements, the following code fragment shows the best way to handle these:
IF _WINDOWS
Do Windows-specific commands
ELSE
Do MS-DOS -specific commands
ENDIF
|
Additional reference words: VFoxWin 3.00 FoxWin 2.50 2.50a
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |