FIX: C0000005 Fatal Error With This.Caption=This.Text In GotFocus (221693)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q221693

SYMPTOMS

After adding a custom property named Text to a form and then using the code This.Caption = This.Text from a form method, you might receive the error:
Fatal error: Exception code=C0000005

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base:

194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why

194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new form.
  2. Add a new form property and name it "Text."
  3. In either the form's Activate or GotFocus event, paste the following code:
    ThisForm.Text = "Test Form"
    ThisForm.Caption = ThisForm.Text
    					
  4. Save and run the form.
  5. Close the form and run the form again if necessary to create the error.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbContainer kbCtrl kbOOP kbVS600sp3fix KB221693