Microsoft KB Archive/137279

= PRB: Program w/ @..SAY..GETs Exits If Press PAGE UP/PAGE DOWN =

Article ID: 137279

Article Last Modified on 5/7/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition
 * Microsoft Visual FoxPro 7.0 Professional Edition

-



This article was previously published under Q137279



SYMPTOMS
Some developers porting code form other FoxPro versions, including MS-DOS and Windows, are still using hard coded screen displays (@..SAY..GETs in a .prg file).

In Visual FoxPro, you will find that the behavior is somewhat different from version 2.x products and other XBase languages. Pressing the PAGE UP or PAGE DOWN key while the program is running causes the program to stop, and no validation takes place if the GET command has a Valid clause.



RESOLUTION
In the beginning of the program place this code: ON KEY LABEL PGUP KEYBOARD "{BACKTAB}" ON KEY LABEL PGDN KEYBOARD "{TAB}" This will allow the program to continue normally as if the ENTER key was pressed.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
  Create a program containing this code: CLEAR mvar = SPACE(10) mvar2 = SPACE(10) @ 1,1 GET mvar VALID myvalid @ 4,1 GET mvar2 READ CYCLE

PROCEDURE myvalid WAIT WINDOW 'In the Procedure of Myvalid' RETURN  Run the program. Put a value in mvar and press ENTER. The message 'In the Procedure of Myvalid' appears as expected. Enter a value in mvar2 and press ENTER. The program cycles back to mvar. Press the PAGE DOWN Key. The program exits, and no validation takes place.</ol>

Additional query words: VFoxWin

Keywords: kbprb KB137279

-

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

© Microsoft Corporation. All rights reserved.