Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ActiveForm is not an object
Message
De
18/12/1999 12:51:09
 
 
À
18/12/1999 11:17:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00305647
Message ID:
00305675
Vues:
26
>Hi,
> I have a top level form and multiple MDI form. I place toolbar on my top level form and issue _SCREEN.ACTIVEFORM.mymethod(). It works most of the time, but VFP give error ACTIVEFORM is not an Object sometime... why does it happen? hor to solve?
>

There are numerous times when there is no ActiveForm available - nothing is running in the context of _SCREEN, the system is transitioning between forms, or the Form with focus has no active and visible controls. This is well-documented in the on-line help for ActiveForm and ActiveControl. Before using these for reference, it is strongly advised that you check that they are valid by:

IF TYPE("_SCREEN.ActiveForm") = "O" AND NOT ISNULL(_SCREEN.ActiveForm)

and

IF TYPE("_SCREEN.ActiveControl") = "O" AND NOT ISNULL(_SCREEN.ActiveControl)

The same applies to FormSet.ActiveForm and Form.ActiveControl, or the _VFP. or Application. object references.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform