Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with _Screen.ActiveForm.ActiveControl
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00476476
Message ID:
00503216
Vues:
27
>if vartype(_Screen.ActiveForm) = "O" ;
>   and pemstatus(_Screen.ActiveForm,"BaseClass",5) ;
>   and upper(_Screen.ActiveForm.BaseClass) = "FORM" then
>   return _Screen.ActiveForm
>else
>   * use a Do While Loop to cycle through the .Parent properties until you get to an object that's a form
>   local lotmp
>   lotmp = _Screen.ActiveForm.Parent
>   do while .T.
>      if isnull(lotmp);
>         or upper(lotmp.BaseClass) = "FORM" then
>         exit
>      else
>         lotmp = iif(vartype(lotmp.Parent) = "O",lotmp.Parent,NULL)
>      endif
>   enddo
>
>   return lotmp
>endif
I'm tired from getting no sleep (broke up with gf), but hopefully I didn't miss something here. You are testing to see if the ActiveForm is an Object. But if not you go ahead and look for the Parent as ActiveForm was an Object. Are you sure it was what you had in mind?
- Erik Niese-Petersen

Crazy Dane in USA.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform