Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Change to my classes
Message
De
14/03/2003 18:09:22
Jorge Haro
Independent Consultant
Juarez, Mexique
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00766060
Message ID:
00766075
Vues:
22
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform