pageframe.noActivePage.SetFocus>>Here is my page class. You add this to your memberclass in your pageframe using the visual designed. MAKE SURE YOU ARE BACKED UP. I have seen a class trashed do this after the fact.
>>DEFINE CLASS cpage AS page >> lRefreshOnPageChange = .f. >> name = "cpage" >> *// backcolor = 16638920 >> PROCEDURE init() >> DODEFAULT() >> * this ldirtyflag is on my form and bindevent fires when the value changes. >> * My framework automaticly changes the flag when user enteres data. >> IF PEMSTATUS(thisform,"ldirtyflag",5) >> BINDEVENT(thisform,"ldirtyflag",this,"setdatatosavestatus",1) >> ENDIF >> ENDPROC >> >> PROCEDURE activate() >> IF this.parent.nCurrentPage <> this.Parent.activepage >> this.Parent.activatepage(this.Parent.activepage) >> this.Refresh() >> ENDIF >> this.parent.ncurrentpage = this.Parent.activepage >> thisform.lockscreen = .f. >> 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.ldirtyflag >> ENDIF >> ENDPROC >> >>ENDDEFINE >>>>