Article ID: 111676
Article Last Modified on 10/16/2002
APPLIES TO
- Microsoft Visual FoxPro 3.0 Standard Edition
- Microsoft Visual FoxPro 5.0 Standard Edition
- Microsoft Visual FoxPro 5.0a
- Microsoft Visual FoxPro 6.0 Professional Edition
This article was previously published under Q111676
SYMPTOMS
The command SHOW POPUP will not show a popup defined as part of the system menu. The following example is taken from the FoxPro for Windows 2.x Help to illustrate this problem. The Visual FoxPro Help file does not provide this example. This same code works correctly in FoxPro for MS-DOS.
*** CODE BEGINS HERE *** *** Name this program SHOW.PRG *** CLEAR SET SYSMENU SAVE SET SYSMENU TO DEFINE PAD cardpad OF _MSYSMENU PROMPT '\<Card Info'; COLOR SCHEME 3 KEY ALT+I, '' DEFINE PAD showpad OF _MSYSMENU PROMPT '\<Show Card Info' ; COLOR SCHEME 3 KEY ALT+I, '' DEFINE PAD clearpad OF _MSYSMENU PROMPT 'C\<lear Card Info' ; COLOR SCHEME 3 KEY ALT+I, '' ON PAD cardpad OF _MSYSMENU ACTIVATE POPUP cardinfo ON SELECTION PAD showpad OF _MSYSMENU ; DO choice IN show WITH PROMPT( ), POPUP( ) ON SELECTION PAD clearpad OF _MSYSMENU ; DO choice IN show WITH PROMPT( ), POPUP( ) DEFINE POPUP cardinfo MARGIN RELATIVE SHADOW COLOR SCHEME 4 DEFINE BAR 1 OF cardinfo PROMPT '\<View Charges' ; KEY ALT+V, '' DEFINE BAR 2 OF cardinfo PROMPT 'View \<Payments' ; KEY ALT+P, '' DEFINE BAR 3 OF cardinfo PROMPT 'Vie\<w Users' ; KEY ALT+W, '' DEFINE BAR 4 OF cardinfo PROMPT '\-' DEFINE BAR 5 OF cardinfo PROMPT '\<Charges ' DEFINE BAR 6 OF cardinfo PROMPT '\-' DEFINE BAR 7 OF cardinfo PROMPT 'E\<xit ' ON SELECTION POPUP cardinfo; DO choice IN show WITH PROMPT( ), POPUP( ) PROCEDURE choice PARAMETERS mprompt, mpopup IF mprompt = 'Show Card Info' SHOW POPUP cardinfo RETURN ENDIF IF mprompt = 'Clear Card Info' CLEAR RETURN ENDIF WAIT WINDOW 'You chose ' + mprompt + ; ' from popup ' + mpopup NOWAIT IF mprompt = 'Exit' SET SYSMENU TO DEFAULT ENDIF *** CODE ENDS HERE *** * Choosing "Show Card Info" from the menu does not show the popup, which * illustrates the problem.
RESOLUTION
To work around this problem, use the following syntax and place the appropriate code in CHOICE:
ON SELECTION PAD cardpad OF _MSYSMENU DO choice IN show WITH PROMPT( ),; POPUP( )
STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
Additional query words: kbFP250 kbFP260 kbvfp300 kbvfp500 kbvfp600
Keywords: kbbug KB111676