BUG: MessageBox with Keycomp=Windows Returns Incorrect Value

Last reviewed: February 12, 1997
Article ID: Q163474
The information in this article applies to:
  • Microsoft Visual FoxPro for Macintosh, version 3.0b

SYMPTOMS

When Set Keycomp is equal to Windows in Visual FoxPro for the Macintosh, the MessageBox function returns an incorrect value. According to Visual FoxPro Help, the value returned for a "No" selection is supposed to be a 7.

RESOLUTION

There are a couple of ways you can resolve this issue. One is to hit the spacebar after moving with the arrow or tab keys to the "No" button in the MessageBox dialog box. The other alternative is to Set Keycomp to MAC. This forces the user to use the mouse to select the "No" button. Both of these options return the correct value (7) for a "No" selection.

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.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Type the following commands in the command window:

          SET KEYCOMP to WINDOWS
          msg=MESSAGEBOX("Yes/No Question",36) && Yes/No dialog box buttons
    
                                  &&displayed as well as question mark icon
    
    

  2. Arrow over or tab to the No button. (Note that the thick border does not appear around the No button.) Click Enter.

  3. Type the following command in the command window:

          DISPLAY MEMORY LIKE msg  &&Note the value of msg is equal to 6
    


KBCategory: kbprg kbbuglist
KBSubcategory: FxprgGeneral vfoxmac buglist3.00b
Additional reference words: 3.00b



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: February 12, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.