Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with _Screen.ActiveForm.ActiveControl
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00476476
Message ID:
00503216
Views:
28
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform