FIX: Reference to ActiveForm does not Allow Access to all Properties (221735)



The information in this article applies to:

  • Microsoft Visual FoxPro for Windows 6.0

This article was previously published under Q221735

SYMPTOMS

Storing and referencing the ActiveForm property of the _VFP object as a variable prevents access to other properties of the object. For example, accessing the Objects.Count property of _VFP.ActiveForms causes the following error:
Unknown member OBJECTS.

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 program that contains the following code:
       PUBLIC ox
       ox = CREATE('form')
       ox.ADDOBJECT('txt1', 'textbox')
       ox.ADDOBJECT('txt2', 'textbox')
       ox.txt1.VISIBLE = .T.
       ox.txt2.VISIBLE = .T.
       ox.SHOW()
       ?_VFP.ACTIVEFORM.OBJECTS.COUNT
       oy=_VFP.ACTIVEFORM
       ?oy.OBJECTS.COUNT
    					
  2. Run the program.
The error mentioned in the SYMPTOMS section occurs on the last line of code.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbOOP kbVS600sp3fix KB221735