Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Delete image controls programatically..
Message
 
To
24/01/2007 01:47:45
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
01188507
Message ID:
01188515
Views:
15
>Can I remove all object without knowing the object name? Like removeall images :)

No, but if you want to remove ALL images:
DIMENSION aImage[1]
LOCAL lnFor, lnImage
lnImage = 0
FOR lnFor = 1 TO thisform.ControlCount
    IF UPPER(thisform.Controls(lnFor).BaseClass) == [IMAGE]
       lnImage = lnImage + 1
       DIMENSION aImage[lnImage]
       aImage[lnImage] = thisform.Controls(lnFor).Name
    ENDIF
NEXT
FOR lnFor = 1 TO lnImage
    thisform.RemoveObject(aImage[lnImage])
NEXT
not tested
Also this will remove only images which is placed directly on the form, not if you have them in some container classes.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform