BUG: SHOW POPUP Does Not Work with Menu Popups

Last reviewed: May 6, 1997
Article ID: Q111676
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, versions 3.0, 5.0, 5.0a
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x
  • Microsoft FoxPro for Macintosh, versions 2.5x, 2.6x

SYMPTOMS

The command SHOW POPUP will not show a popup defined as part of the system menu. The following example was taken from the FoxPro for Windows online help to illustrate this problem. 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

   ON SELECTION PAD cardpad OF _MSYSMENU DO choice IN show WITH PROMPT( ),;
    POPUP( )

and place the appropriate code in CHOICE.

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.


Keywords : buglist2.50 buglist2.50a buglist2.50b buglist2.50c vfpbug5.0a kbbuglist
Version : 2.5x 2.6x 3.0 5.0 5.0a
Platform : MACINTOSH WINDOWS
Issue type : kbbug


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.