Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Application.ActiveForm not available
Message
From
08/04/2002 10:02:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00642128
Message ID:
00642167
Views:
17
>>In a certain function, I am relying on property Application.ActiveForm. It used to work, but "suddenly" (may have been weeks ago, I don't know) it stopped working - the debugger tells me, can't evaluate expression Application.ActiveForm. _vfp.ActiveForm doesn't work either. And yes, a form is indeed open at that moment. What can be the reason for VFP not being able to process Application.ActiveForm? And is there any similar property, safer to use?
>>
>>TIA, Hilmar.
>
>You can try _Screen.ActiveForm.
>
>Did you by chance add an ActiveX control to the form? FYI, ActiveForm could be a reference to it and not the form.

No, I don't have ActiveX. And I don't get the wrong object - I get "can't evaluate the expression".

I tried all of the following:
_Screen.ActiveForm
_VFP.ActiveForm
Application.ActiveForm
What I do is call up a function from an EditBox. One of the menus on the right-click menu is supposed to get the data in the EditBox and send it to the default textbox editor. So, 'tis the EditBox that has the focus.

In general, I find it preferable, and safer, to send a parameter to a function (e.g., ThisForm.EdbShowResults), but I didn't find a way to do this with a right-click menu item. The moment the function gets called (with on pad...), ThisForm, etc., isn't available.

Of course, I could use some (temporary) public variable, but I thought ...ActiveForm should work.

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform