Microsoft KB Archive/103276: Difference between revisions
(importing KB archive) |
m (Text replacement - "<" to "<") |
||
(One intermediate revision by the same user not shown) | |||
Line 11: | Line 11: | ||
== SUMMARY == | == SUMMARY == | ||
Page L3-685 of the | Page L3-685 of the "Language Reference" manual states "The following example uses MRKPAD() to toggle the mark character of a menu pad when you choose it." However, this example does not work correctly in FoxPro for Windows. | ||
== MORE INFORMATION == | == MORE INFORMATION == | ||
Line 17: | Line 17: | ||
The FoxPro for Windows system menu cannot display mark characters, demonstrating similar behavior to other Windows-based applications. To view the mark characters, you must use a menu name other than _msysmenu. | The FoxPro for Windows system menu cannot display mark characters, demonstrating similar behavior to other Windows-based applications. To view the mark characters, you must use a menu name other than _msysmenu. | ||
The following program is a modified version of the example on page L3-686 of the | The following program is a modified version of the example on page L3-686 of the "Language Reference." It works as expected in FoxPro for Windows. | ||
<pre> *** Name this program MARKPAD.PRG *** | <pre> *** Name this program MARKPAD.PRG *** | ||
Line 34: | Line 34: | ||
***** _msysmenu must be changed to mainmenu | ***** _msysmenu must be changed to mainmenu | ||
DEFINE PAD syspad OF mainmenu PROMPT '\ | DEFINE PAD syspad OF mainmenu PROMPT '\<System' ; | ||
COLOR SCHEME 3 KEY ALT+S, '' | COLOR SCHEME 3 KEY ALT+S, '' | ||
DEFINE PAD editpad OF mainmenu PROMPT '\ | DEFINE PAD editpad OF mainmenu PROMPT '\<Edit' ; | ||
COLOR SCHEME 3 KEY ALT+E, '' | COLOR SCHEME 3 KEY ALT+E, '' | ||
DEFINE PAD recordpad OF mainmenu PROMPT '\ | DEFINE PAD recordpad OF mainmenu PROMPT '\<Record' ; | ||
COLOR SCHEME 3 KEY ALT+R, '' | COLOR SCHEME 3 KEY ALT+R, '' | ||
DEFINE PAD windowpad OF mainmenu PROMPT '\ | DEFINE PAD windowpad OF mainmenu PROMPT '\<Window' ; | ||
COLOR SCHEME 3 KEY ALT+W, '' | COLOR SCHEME 3 KEY ALT+W, '' | ||
DEFINE PAD reportpad OF mainmenu PROMPT 'Re\ | DEFINE PAD reportpad OF mainmenu PROMPT 'Re\<ports' ; | ||
COLOR SCHEME 3 KEY ALT+P, '' | COLOR SCHEME 3 KEY ALT+P, '' | ||
DEFINE PAD exitpad OF mainmenu PROMPT 'E\ | DEFINE PAD exitpad OF mainmenu PROMPT 'E\<xit' ; | ||
COLOR SCHEME 3 KEY ALT+X, '' | COLOR SCHEME 3 KEY ALT+X, '' | ||
Latest revision as of 10:15, 20 July 2020
MRKPAD() Example Does Not Work in FoxPro for WindowsID: Q103276 The information in this article applies to:
SUMMARYPage L3-685 of the "Language Reference" manual states "The following example uses MRKPAD() to toggle the mark character of a menu pad when you choose it." However, this example does not work correctly in FoxPro for Windows. MORE INFORMATIONThe FoxPro for Windows system menu cannot display mark characters, demonstrating similar behavior to other Windows-based applications. To view the mark characters, you must use a menu name other than _msysmenu. The following program is a modified version of the example on page L3-686 of the "Language Reference." It works as expected in FoxPro for Windows. *** Name this program MARKPAD.PRG *** CLEAR SET SYSMENU SAVE SET SYSMENU TO ****This line must be added DEFINE MENU mainmenu SET MARK OF MENU mainmenu TO CHR(4) PUBLIC markpad markpad = .T. ***** _msysmenu must be changed to mainmenu DEFINE PAD syspad OF mainmenu PROMPT '\<System' ; COLOR SCHEME 3 KEY ALT+S, '' DEFINE PAD editpad OF mainmenu PROMPT '\<Edit' ; COLOR SCHEME 3 KEY ALT+E, '' DEFINE PAD recordpad OF mainmenu PROMPT '\<Record' ; COLOR SCHEME 3 KEY ALT+R, '' DEFINE PAD windowpad OF mainmenu PROMPT '\<Window' ; COLOR SCHEME 3 KEY ALT+W, '' DEFINE PAD reportpad OF mainmenu PROMPT 'Re\<ports' ; COLOR SCHEME 3 KEY ALT+P, '' DEFINE PAD exitpad OF mainmenu PROMPT 'E\<xit' ; COLOR SCHEME 3 KEY ALT+X, '' ON SELECTION MENU mainmenu ; DO choice IN markpad WITH PAD( ), MENU( ) **** Turn off the System Menu SET SYSMENU OFF **** Activate user defined menu ACTIVATE MENU mainmenu **** Restore System Menu SET SYSMENU ON SET SYSMENU TO DEFAULT PROCEDURE choice PARAMETER mpad, mmenu WAIT WINDOW 'You chose ' + mpad + ; ' from menu ' + mmenu NOWAIT SET MARK OF PAD (mpad) OF mainmenu TO ; ! MRKPAD('mainmenu', mpad) markpad = ! markpad IF mpad = 'EXITPAD' DEACTIVATE MENU mainmenu ENDIF Additional reference words: FoxWin 2.50 2.50a KBCategory: kbprg KBSubcategory: FxprgGeneral |
Last Reviewed: June 27, 1995 |