Backup before you do any of this, you can open your form as a table (use myform.scx), and replace the class and classloc fields, like this:
replace all class with 'MyTxtClass', classloc with '\MyClasses\MiLibrary.vcx' for class = 'textbox'
You must indicate the correct route to your library in classloc, it's not enough for the location of the library to be in the current path. To know the exact values you must use, create a form with nothing but a textbox of your class and copy the values from there, the record for the textbox should be the fourth.
You can create a simple program that loops through your forms and does this for each one:
local lnFileCount, i
lnFileCount = adir(laFiles,"*.scx")
for i=1 to lnFileCount
use (laFiles[i,1])
replace all class with 'MyTxtClass', classloc with '\MyClasses\MiLibrary.vcx' for class = 'textbox'
use
endfor
>Hallo
>I have not worked with classes so much before. I have only used the baseclasses that follows with VFP7.
>Now I have created a textboxclass that I want to use in an application instead of the original.
>I can see an enormous job to add my boxes, copy all the event codes from the old boxes, and then delete the old ones... one by one, in all forms!
>Are there any easier way to change from a baseclass to an userdefined class.
>
>/Kjell