Forms, FormCount
Forms is a collection property—it's an array containing one entry for each form in a form set. FormCount tells you how many forms there are, but, in VFP 3, it gets confused by toolbars.
Usage |
frmForm = frsFormSet.Forms ( nIndex ) nFormCount = frsFormSet.FormCount |
In VFP 3, FormCount forgets to count toolbars at all, whether or not they're listed in Forms at that moment. Unless you're checking _SCREEN's FormCount. Then, it counts undocked toolbars, but not docked toolbars. (The behavior we describe here is in VFP 3.0b. We think it may have been different in 3.0.) These bugs are fixed in VFP 5 and later versions. |
Example |
* Check if a particular form is in a given form set FOR nCount = 1 TO ThisFormSet.FormCount IF Forms[nCount].Name = cName WAIT WINDOW "Found It" EXIT ENDIF ENDFOR |
See Also |