FIX: Reference to ActiveForm does not Allow Access to all Properties

ID: Q221735


The information in this article applies to:


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 this to be a bug in the Microsoft products 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:

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

Q194295 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:


  2. 
       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 
  3. Run the program.


The error mentioned in the SYMPTOMS section occurs on the last line of code.

Additional query words: KBDSE


Keywords          : kbservicepack kbOOP kbVFp600 kbVFp600bug kbVS600sp2 kbVS600SP1 kbVS600sp3fix kbGrpFox 
Version           : WINDOWS:6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 19, 1999