lnForms = adir(aforms, 'forms\*.scx') for lnX = 1 to lnFOrms modi form (aForms[lnX]) nowait aSelObj(aA, 1) loopthroughcontrols(aA[1]) activate window 'form' keyboard '{ctrl + w}' endforNow, this is where the ResetToDefault() it done, it loops throuhgh every control looking for "MyClass" and then Resets the "Caption" property.
*LoopThroughControls.PRG lparameters loObject local loControl, lcBaseClasses lcBaseClasses = 'FORM GRID COLUMN CONTAINER CONTROL COMMANDGROUP OPTIONGROUP PAGE PAGEFRAME' do case case type('loObject.ControlCount') = 'N' for each loControl in loObject.Controls if upper(loControl.Class) = 'MYCLASS' loControl.ResetToDefault('Caption') endif if upper(loControl.BaseClass) $ lcBaseClasses LoopTHroughControls(loControl) endif endfor case type('loObject.ButtonCount') = 'N' for each loControl in loObject.Buttons if upper(loControl.Class) = 'MYCLASS' loControl.ResetToDefault('Caption') endif if upper(loControl.BaseClass) $ lcBaseClasses LoopTHroughControls(loControl) endif endfor case type('loObject.PageCount') = 'N' for each loControl in loObject.Pages if upper(loControl.Class) = 'MYCLASS' loControl.ResetToDefault('Caption') endif if upper(loControl.BaseClass) $ lcBaseClasses LoopTHroughControls(loControl) endif endfor case type('loObject.ColumnCount') = 'N' for each loControl in loObject.Columns if upper(loControl.Class) = 'MYCLASS' loControl.ResetToDefault('Caption') = 'C' endif upper(if loControl.BaseClass) $ lcBaseClasses LoopTHroughControls(loControl) endif endfor endcase