Microsoft KB Archive/92350

= INFO: Use the FoxPro ON KEY Command =

Article ID: 92350

Article Last Modified on 2/10/2005

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.0
 * Microsoft FoxPro 2.5b for MS-DOS
 * Microsoft FoxPro 2.5a
 * Microsoft FoxPro 2.5b
 * Microsoft FoxPro 2.5a

-



This article was previously published under Q92350



SUMMARY
The ON KEY command clears all previous ON KEY LABEL commands. However, the ON KEY LABEL commands clears only the specified key.

The following sample application demonstrates how the ON KEY command works by displaying an appropriate message when the user presses one of the arrow keys: SET TALK OFF CLEAR mexit=.F.  ON ESCAPE mexit=.T.   ON KEY LABEL RIGHTARROW ? &quot;Right Arrow&quot; ** Sets ON KEY LABEL for right arrow to display &quot;Right Arrow&quot;.

ON KEY LABEL LEFTARROW ? &quot;Left Arrow&quot; ** Sets ON KEY LABEL for left arrow to display &quot;Left Arrow&quot;.

ON KEY LABEL UPARROW ? &quot;Up Arrow&quot; ** Sets on key label for up arrow to display the &quot;Up Arrow&quot;.

ON KEY LABEL DNARROW ? &quot;Down Arrow&quot; ** Sets on key label for down arrow to display &quot;Down Arrow&quot;.

@ 0,0 SAY &quot;Press any arrow key or Press  to exit&quot; DEFINE WINDOW menter FROM 10,20 TO 14,60 DOUBLE ACTIVATE WINDOW menter DO WHILE NOT mexit ENDDO DEACTIVATE WINDOW menter ON KEY LABEL RIGHTARROW ** This statement removes the ON KEY LABEL for the right arrow only.

ON KEY ** This statement removes all remaining ON KEY LABEL assignments.

Additional query words: reset

Keywords: kbinfo KB92350

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.