Lparameters tcPageName, tcActivate, tcThemes Local lcPageName, lcWithName, llActivate, llThemes lcPageName = tcPageName lcWithName = "thisform.pageframe1." + Alltrim(lcPageName) * Activate or DeActivate this pageframe? * parameter tcActivate is the True or False Control * If we call it with TRUE then it is an ACTIVATE llActivate = tcActivate * 3rd Parameter is Themes control * True means we want Themes * False - NO Themes If Pcount() >= 3 llThemes = tcThemes Else llThemes = .T. Endif * Form ACTIVATE CODE BELOW If llActivate = .T. * With command Macro Substitution below With &lcWithName .FontBold=.T. .FontItalic=.F. .FontUnderline = .T. * make sure the fontsize is not too large! * now update the fontsize to be 1 larger .FontSize = thisform.original_pageframe_fontsize + 1 *.FontName = "arial" * turn on themes Sys(2700,Iif(llThemes,1,0)) Endwith Else * Form DEACTIVATE CODE BELOW * With command Macro Substitution below With &lcWithName .FontBold=.F. .FontItalic=.F. .FontUnderline = .F. * restore original font size from init() .FontSize = thisform.original_pageframe_fontsize * turn off themes regardless of activate parameter Sys(2700,0) Endwith EndifI call this method from both the Activate and Deactivate with code like this:
* Call form method to take the place of all activates * Method has parameters that are: * 1) Page Frame Name which is the page name * 2) True if Activate False if DeActivate * 3) True if you want Themes Turned Off, False if you want NO Themes Thisform.page_activate(This.Name,.T.,.T.)