>>I have an app with forms based on the default VFP base forms. Now that I know more about OOP, I want to change these forms so they are based on a subclass of the VFP base form. Is there a way to do this without having to copy the methods and objects in each existing form to a new one, or is there a low level shortcut for doing this?
>>
>>Mon
>I liked the "low level" idea :) It could be done via "medium level". Open the form (.scx) as a table, find the object with baseclass = "Form", change Class, Classloc properties.
>Cetin
Batch code (make backups first:)
lparameters tcClass, tcClassLoc
lcFormDir = getdir()
if empty(lcFormdir)
return
endif
nFiles = adir(aSCX,lcFormDir+"*.scx)
for ix = 1 to nFiles
use (aSCX[ix])
replace class with tcClass, classloc with tcClassLoc ;
for baseclass = "Form"
use
endfor
Cetin