************************************************** *-- Class: srposition (q:\rad\apvfp\byo\libs\ctls.vcx) *-- ParentClass: custom *-- BaseClass: custom *-- Time Stamp: 04/07/06 07:26:08 PM * #INCLUDE "q:\sopstver\db\vfp9\foxpro.h" * DEFINE CLASS srposition AS custom cproplist = "top,left" Name = "srposition" inisection = .F. PROCEDURE save1 LPARAMETERS cProp IF PEMSTATUS(this.Parent, cProp, 0) DO prof_w WITH this.parent, cProp, GETPEM(this.Parent, cProp) ENDIF ENDPROC PROCEDURE load1 Lparameters tcProp uDefault=GetPem(This.Parent,tcProp) uValue=prof_r(This.Parent, tcProp,uDefault, Vartype(uDefault)) Store uValue to ("this.parent."+tcProp) ENDPROC PROCEDURE Destroy *-- parent may be absent if I'm in development If Type("this.parent.name")="C" For i=1 To Getwordcount(This.cproplist,",") lcProp=Getwordnum(This.cproplist,i,",") This.save1(lcProp) Endfor Endif ENDPROC PROCEDURE Init Lparameters tcPropList If Pcount()>0 this.cproplist=tcProplist endif this.inisection=this.Parent.Name Local i For i=1 to GetWordCount(this.cproplist,",") lcProp=GetWordNum(this.cproplist,i,",") this.load1(lcProp) endfor ENDPROC ENDDEFINEProf_r and prof_w are my functions to write a profile string, you can easily substitute your own, or use some other type of storage instead. I'm passing the parent object as the first parameter and then converting that into a sys(1272) pathname in there, as a section name.