Hi Kurt,
FOR lii=_Screen.ControlCount TO 1 STEP -1
_Screen.RemoveObject(_Screen.Controls(lii).Name)
NEXT
MartiJ
>Hi all,
>
>i have created a few labels and textboxes on my vfpdesktop with _screen.addobject.
>the names of my objects are given random via the sys() command.
>
>then i created a buttom to refresh my desktopobjects.
>
>My queston is it possible to clear and remove all my objects on the desktop even when i don't know the name of my labels ?
>
>i've tried with _screen.cls but that doesn't work
>
>thnx