* PurgReso.prg * * Clean some junk out of the current resource file, if any. local lcSetExac, lcSetReso, lnSele if empty(set("resource", 1) ) messagebox("No resource file is specified", ; 0, "No Resource File") return endif if !file(set("resource", 1) ) messagebox("Specified resource file (" ; + set("resource", 1) + ") does not exist.", ; 0, "No Resource File") return endif lcSetExac = set("exact") set exact off lcSetReso = set("resource") set resource off lnSele = select() select 0 use (set("resource", 1) ) exclusive * I like to keep only the DEFAULT record * for each type of MODIFY window. delete for id = "WIND" ; and not (empty(name) or name='.' or name="DEFAULT") * Check whether a Report Preview has messed up the Report Toolbars locate for id = "TTOOLBAR" and name = "Print Preview" if found() delete delete for id = "REPORTTOOLS" endif pack pack memo use select (lnSele) set resource &lcSetReso set exact &lcSetExac * eof: PurgReso.prg