define class objects_scan as custom procedure go_all_over lParameters ParentContainer local i,oControl for each oControl in ParentContainer.Controls do case Case oControl.baseclass=="Pageframe" for i = 1 to oControl.Pagecount this.go_all_over(oControl.Pages(i)) next case oControl.baseclass=="Container" this.go_all_over(oControl) case oControl.baseclass=="Grid" for i = 1 to oControl.columncount this.go_all_over(oControl.columns(i)) next otherwise this.do_the_thing(oControl) endcase next this.do_the_thing(ParentContainer) procedure do_the_thing Lparameters oControl && Place to put your action over && currently scanned control && passed here as parameter enddefineImplementation in subclass that going to be dropped on the form
define class oScan as objects_scan procedure do_the_thing Lparameters oControl local oControl && Place to put your action over && currently scanned control && passed here as parameter wait wind oControl.name enddefine ****After being dropped on the form
thisform.oScan.go_all_over(thisform) && or thisform.oScan.go_all_over(thisform.grid1) && or thisform.oScan.go_all_over(thisform.PageFrame1) && depend what you want to scanHope this can help you.