Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating class questions
Message
De
20/02/2001 08:13:42
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
20/02/2001 05:36:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00477544
Message ID:
00477570
Vues:
23
>Hi,
>
>I like to learn more about creating class library for my application use.
>However, I often encountered the problems of not know whether which
>control especially ActiveX which I am using can be sub-class from.
>
>For example, I am creating a new class, to include a timer and 02 ActiveX
>controls, since it can simplify my coding. However, I do not
>know to sub-class from form, custom or control ? Please advise
>and help. Thank you

Virusim,
I do like this :
Create a test form and put controls on it.
Add code to controls till I get the effect I want and add some form props-methods as necessary.
In controls' code instead of saying thisform I say this.parent (or this.parent.parent) and use with...endwith to possible extent.
When I'm satisfied with behaviour I select the controls and Saveasclass (selected controls). This creates a 'container' based class.
I modify the saved class to copy&paste properties-methods formerly added to the form (either visually or by hacking the .vcx).

Last step sounds to be cumbersome but since it reduces testing phase (as a form) it's something I can live with (IMHO better than directly creating container and adding it to form for testing).

As another final step I put the class to a new test form and test.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform