Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/103601

From BetaArchive Wiki

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