PRB: ON KEY LABEL KEYBOARD "{CTRL+C}" Does Not Work in a GET

Last reviewed: April 29, 1996
Article ID: Q95381
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

SYMPTOMS

Using a KEYBOARD command as part of an ON KEY LABEL statement to issue an edit shortcut key sequence does not work in a GET field.

CAUSE

Issuing an ON KEY LABEL command in a GET field causes control to exit the GET field. Because of this, the original position of the cursor before the edit function was called is lost. This causes garbage to be returned to the GET field.

RESOLUTION

Enter the desired KEYBOARD edit shortcut key commands as a macro assignment instead of using an ON KEY LABEL command.

MORE INFORMATION

For example, if you issue either of the following statements while in a GET field, the desired editing functions will not be performed:

   ON KEY LABEL F7 KEYBOARD "{CTRL+C}"  && to cut the highlighted text
   ON KEY LABEL F8 KEYBOARD "{CTRL+V}"  && to paste text


Additional reference words: FoxDos FoxWin on key label get
keyboard 2.00
2.50
2.50a
KBCategory: kbprg kbprb
KBSubcategory: FxprgGeneral


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: April 29, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.