Microsoft KB Archive/103601: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 51: | Line 51: | ||
<br /> | <br /> | ||
Menus that are created as part of _msysmenu will always be displayed in MS Sans Serif; for example: | Menus that are created as part of _msysmenu will always be displayed in MS Sans Serif; for example: | ||
<pre class="codesample"> DEFINE PAD test OF _msysmenu PROMPT | <pre class="codesample"> DEFINE PAD test OF _msysmenu PROMPT "Test" | ||
ON PAD test OF _msysmenu ACTIVATE POPUP test | ON PAD test OF _msysmenu ACTIVATE POPUP test | ||
Line 57: | Line 57: | ||
FOR CNT = 1 TO 10 | FOR CNT = 1 TO 10 | ||
DEFINE BAR CNT OF test PROMPT | DEFINE BAR CNT OF test PROMPT "test" + LTRIM(STR(CNT)) | ||
ENDFOR | ENDFOR | ||
</pre> | </pre> | ||
Line 69: | Line 69: | ||
<pre class="codesample"> DEFINE MENU test | <pre class="codesample"> DEFINE MENU test | ||
DEFINE PAD mypad OF test PROMPT | DEFINE PAD mypad OF test PROMPT "My Pad" | ||
ON PAD mypad OF test ACTIVATE POPUP test | ON PAD mypad OF test ACTIVATE POPUP test | ||
DEFINE POPUP test | DEFINE POPUP test | ||
FOR CNT = 1 TO 10 | FOR CNT = 1 TO 10 | ||
DEFINE BAR CNT OF test PROMPT | DEFINE BAR CNT OF test PROMPT "test" + LTRIM(STR(CNT)) | ||
ENDFOR | ENDFOR | ||
Line 82: | Line 82: | ||
<pre class="codesample"> DO WHILE .T. | <pre class="codesample"> DO WHILE .T. | ||
@ 2,2 PROMPT | @ 2,2 PROMPT "test1" | ||
@ 2,12 PROMPT | @ 2,12 PROMPT "test2" | ||
MENU TO x | MENU TO x | ||
ENDDO | ENDDO | ||
Line 92: | Line 92: | ||
FOR CNT = 1 TO 10 | FOR CNT = 1 TO 10 | ||
arr(CNT) = | arr(CNT) = "test" + LTRIM(STR(CNT)) | ||
ENDFOR | ENDFOR | ||
Latest revision as of 09:28, 20 July 2020
Article ID: 103601
Article Last Modified on 11/17/2003
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft FoxPro 2.5b
- Microsoft FoxPro 2.5a
This article was previously published under Q103601
SUMMARY
User-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 Applications
If 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 query words: VFoxWin FoxWin 2.50
Keywords: kbcode KB103601