FoxPro Sample Pop Calculator Program

Last reviewed: June 19, 1995
Article ID: Q89529
The information in this article applies to:
  • Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, and 2.5a
  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a

The following sample program prompts the user to pop the calculator on and off the screen with keys defined by the ON KEY LABEL command.

*:*********************************************************************: *: Program provided without warranty and for example purposes only *: *: Procs & Fncts: MTEST

*:          Calls: MTEST              (procedure in POPCAL20.PRG)
*:********************************************************************* ON KEY LABEL f3 DO mtest ON KEY LABEL f2 KEYBOARD "{CTRL+W}" + "{ENTER}" ON KEY LABEL esc KEYBOARD "{CTRL+W}" + "{ENTER}" DEFINE WINDOW test FROM 1,1 TO 12,79 ACTIVATE WINDOW test @ 1,1 GET X PICTURE "@!" DEFAULT SPACE(10) MESSAGE ;
   "Press F3 to bring up CALCULATOR"
READ CYCLE

*!*********************************************************************

*!      Procedure: MTEST
*!      Called by: POPCAL20.PRG
*!********************************************************************* PROCEDURE mtest ACTIVATE SCREEN @ 24,0 SAY PADC("Press ESCAPE or F2 to return to entry screen",80) ACTIVATE WINDOW calculator READ VALID .T. @ 24,0 *: EOF: POPCAL20.PRG


Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a calendar diary
KBCategory: kbprg kbcode
KBSubcategory: FxtoolAccessory


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: June 19, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.