Microsoft KB Archive/88886

= Using ON KEY Command in FoxBASE+ =

Article ID: 88886

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Fox Software FoxBASE+ 1.21 for MS-DOS
 * Microsoft FoxBASE+ 2.5 for MS-DOS

-



This article was previously published under Q88886



SUMMARY
Only one ON KEY command can be active at one time. It is active only during a READ or when a full-screen editing command is in effect.

This restriction applies to all ON commands in FoxBASE+ (ON ERROR, ON ESCAPE, and ON KEY). Once issued, an ON command remains in effect until another ON command of the same type is issued or the application ends.



MORE INFORMATION
The following program illustrates that when an application issues a second ON KEY command, it replaces the first ON KEY command: CLEAR mvarname = &quot;                   &quot; ON KEY = 315 DO prg1 ON KEY = 316 DO prg2 @ 3,5 SAY &quot;This is a test of on key&quot; @ 4,5 SAY &quot;Please enter a string when finished&quot; @ 5,5 GET mvarname @ 6,5 SAY &quot;F1 = prg1  F2 = prg2&quot; READ

** PROCEDURE file prg1 ** PROCEDURE prg1 @7,5 SAY &quot;This won't display&quot; RETURN

** PROCEDURE file prg2 ** PROCEDURE prg2 @8,5 SAY &quot;This will display&quot; RETURN

Keywords: KB88886

-

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

© Microsoft Corporation. All rights reserved.