Questions on ActiveControl Property in vfp form. 
Author Message
 Questions on ActiveControl Property in vfp form.

Hi,

Recently, i created a vfp form which need constant reference to form
Active Control property, ie : Before activecontrol is lossing focus, an
event is manually triggered first at form Level,
Thisform.Activecontrol.myMethod()

The form works fine, if there is an active field, but when i disabled
all active control during abnormal condition, the form generate an error
... Active Control is not an object.

Question, How to determine ActiveControl property so that i can know
Active Control is actualy 'active' ? i try to use
type(thisform.activecontrol), IsNull() function but no luck. Is there
any better way to do this ?

Please Advice .

Thanks in Advance

Willie Chen



Tue, 18 May 1999 03:00:00 GMT  
 Questions on ActiveControl Property in vfp form.

Willie:  Have you tried
        if type('thisform.activecontrol') = "O"
                thisform.activecontrol.mymethod()
        endif

Note the quote marks inside the type() function call.  They are
necessary.

Barbara Paltiel

**********************************

Quote:

> Hi,

> Recently, i created a vfp form which need constant reference to form
> Active Control property, ie : Before activecontrol is lossing focus, an
> event is manually triggered first at form Level,
> Thisform.Activecontrol.myMethod()

> The form works fine, if there is an active field, but when i disabled
> all active control during abnormal condition, the form generate an error
> ... Active Control is not an object.

> Question, How to determine ActiveControl property so that i can know
> Active Control is actualy 'active' ? i try to use
> type(thisform.activecontrol), IsNull() function but no luck. Is there
> any better way to do this ?

> Please Advice .

> Thanks in Advance

> Willie Chen



Tue, 18 May 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Question on THISFORM.activecontrol property!

2. ActiveControl, ActivePage Properties

3. ActiveControl and ActivePage properties do not work

4. More ActiveControl Questions

5. VFP: Setting default form/form element properties

6. form.Activecontrol

7. form designer: view/properties menubar question

8. - changing form object properties with refresh method - beginner's question

9. VFP 5.0 Form Names Property

10. List boxes in VFP 6.0 - selected property won't set in form's init

11. How to add new property to form in formset in VFP 3.0

12. How to separate the font properties of form for Windows from Macintosh in VFP 3.0

 

 
Powered by phpBB® Forum Software