Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Missing Feature In VFP 7.0?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00697186
Message ID:
00697833
Vues:
18
David,

I'm not sure I understand your aversion to using aselobj(). It really was designed to accomplish the task you are wanting to do. Frankly I think your use of the forms collection to access the designer is kind of an obtuse way of doing it.

If you have a template form, (although I strongly agree with Craig about using some form classes is the best alternative) you can use this simple code fragment to replicate the template

use Template1.scx alias TheForm
select TheForm
copy to (myform)
use
modify form (myform) nowait
aselobj( laTheForm, 1 )
DoYourBuilder( laTheForm[1] )


>I have several template SCX files for the different types of forms I use. My current form builders copy and rename a template file then use the following commands to open the new form file in design mode, create a reference to it and then add objects and set properties:
>
>
MODI FILE (newfile) NOWAIT
>
>FOR ln = 1 TO _SCREEN.FormCount
>   IF _SCREEN.Forms(ln).Name = "frmTemplate"
>      lo = _SCREEN.Forms(ln)
>      EXIT
>   ENDIF
>ENDFOR
>
>lo.Caption = "My New Caption"
>...
>
>If I am using the code:
>
>
CREATE FORM (myform) AS myForm FROM myForms NOWAIT
>
>don't I first have to convert my template SCX files into a VCX class file?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform