DOCUMENT:Q121054  09-NOV-1994  [FOXPRO]
TITLE   :PRB: Cursor Incorrectly Positioned When Using ON KEY LABEL
PRODUCT :Microsoft FoxPro
PROD/VER:2.00 2.50x 2.60 2.60a | 2.50x 2.60 2.60a
OPER/SYS:MS-DOS                | WINDOWS
KEYWORDS:kbprg

--------------------------------------------------------------------
The information in this article applies to:

 - Microsoft FoxPro for MS-DOS, versions 2.0, 2.5x, 2.6, 2.6a
 - Microsoft FoxPro for Windows, versions 2.5x, 2.6, 2.6a
--------------------------------------------------------------------

SYMPTOMS
========

When you are using the ON KEY LABEL to enter text in an @ ... EDIT region,
the text is inserted a couple of carriage returns (CRs) before where the
cursor was positioned when the ON KEY LABEL statement was invoked.

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 Problem
--------------------------

1. Type the following code in TEST.PRG:

     ON KEY LABEL CTRL+T KEYBOARD "Test"
     @ 3,3 EDIT m.contents DEFAULT SPACE(50) SIZE 10,50
     READ CYCLE

2. Run TEST.PRG.

3. Type "This is a test" in the rectangular text editing region.

4. Press the ENTER key five times.

5. Press CTRL+T.

Note that the text is inserted a few CRs before where the cursor was
positioned when the ON KEY LABEL statement was invoked.

NOTE: This problem does NOT occur in FoxPro 2.5x for Macintosh.

Additional reference words: FoxDos FoxWin 2.00 2.50a 2.50b 2.60 2.60a
keyboard
KBCategory: kbprg
KBSubcategory:

=============================================================================

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.

Copyright Microsoft Corporation 1994.