DEFINE CLASS cpage AS page lRefreshOnPageChange = .f. name = "cpage" backcolor = 16638920 PROCEDURE init() DODEFAULT() IF PEMSTATUS(thisform,"ildatatoupdate",5) BINDEVENT(thisform,"ildatatoupdate",this,"setdatatosavestatus",1) ENDIF ENDPROC PROCEDURE activate() thisform.lockscreen = .f. IF this.parent.nCurrentPage <> this.Parent.activepage this.Parent.activatepage(this.Parent.activepage) this.Refresh() ENDIF this.parent.ncurrentpage = this.Parent.activepage DODEFAULT() ENDPROC PROCEDURE deactivate() thisform.lockscreen = .t. this.parent.pagechange(this.Parent.activepage) IF PEMSTATUS(this.Parent,"nLastActivePage",5) this.Parent.nLastActivePage = this.Parent.activepage ENDIF DODEFAULT() ENDPROC PROCEDURE setdatatosavestatus() IF this.Parent.activepage <> this.pageorder this.Enabled = not thisform.ildatatoupdate ENDIF ENDPROC ENDDEFINE>The title of the message is kind of vague so let me explain.