Knowledge Base

FIX: Invalid Page Fault Occurs After Replicate of Enter Key

Article ID: 167147

Article Last Modified on 10/16/2002


APPLIES TO


This article was previously published under Q167147

SYMPTOMS

After using the REPLICATE function on the Enter key, Visual FoxPro causes an Invalid Page Fault to occur. This occurs after clicking into any active window after the REPLICATE function has been performed.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Visual FoxPro 5.0a for Windows.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Copy the following lines of code into a .prg file and run it:
          PUBLIC x
          x = CREATEOBJECT( 'form1' )
          x.Show
    
          **************************************************
          *-- Form:         form1 (h:\vfp5\misc\cyrus_edt2.scx)
          *-- ParentClass:  form
          *-- BaseClass:    form
          *
          DEFINE CLASS form1 AS Form
            Top = 0
            Left = 0
            DoCreate = .T.
            Caption = "Form1"
            Name = "Form1"
    
            ADD OBJECT edit1 AS EditBox WITH ;
                  Height = 217, ;
                  Left = 12, ;
                  Top = 12, ;
                  Width = 121, ;
                  Name = "Edit1"
    
    
            PROCEDURE Click
                  KEYBOARD REPLICATE( "a{enter}", 60 ) PLAIN
                  KEYBOARD REPLICATE( "a{enter}", 60 ) PLAIN
                  KEYBOARD REPLICATE( "a{enter}", 60 ) PLAIN
                  KEYBOARD REPLICATE( "a{enter}", 60 ) PLAIN
            ENDPROC
    
          ENDDEFINE
          *
          *-- EndDefine: form1
          **************************************************
  2. Click anywhere on the form outside of the Edit box region. NOTE: this populates the edit region with multiple lines of the letter "a."
  3. Click into any active window outside of the form, such as the Command window. NOTE: The error is generated.

Keywords: kbbug kbfix kbvfp500afix KB167147