Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Static or Dynamic Form Classes?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00667997
Message ID:
00668044
Vues:
19
VFP does a great job of rendering a form with mulitple pages. The hidden pages are not rendered in memory until they are activated which saves a considerable amount of time in the initialization of the form.

I would recommend using the technique of using a table to store the layout of the pages for when you need different layouts depending on input the user provides or a generic form that is used for different purposes. Kevin uses a sample in the Mere Mortals Framework where he has a veternarian clinic. He used one form that dynamically changes depending on the type of animal being treated. A dog has different information to capture than a turtle does.

>I'm looking for options/opinions here. We're planning to develop using form classes rather than forms. However, there is some division in our group about how we should implement their use.
>
>In one sense, we'll be working in the same fashion as the Mere Mortals framework; we'll have a small library of form classes and each new program will subclass one or more of those form classes.
>
>No problems so far. The real division comes in trying to decide, do we paint all the fields on our form class using the class designer or do we store information about positioning in a table and programatically place things on the screen when they're needed. In other words, if we have a form with 2 pages (in a page frame) -- 1 page for a grid view and the other for a data entry view -- and the user only comes in to look at the grid view, we would never have to instantiate the objects on the second page.
>
>So, the issue arrises, where is the balance between speed of instantiating form classes and the ease of development. Not being able to lay things out visually is a real pain and yet doing so can slow the instantiation of a form down considerably ... especially when you're still supporting some slow Win95 machines.
>
>Is there any kind of a middle ground? Something that will allow you the visual layout for development but still keep the instantiation of a form class nice and snappy?
>
>Thanks for whatever advice you can offer!
>
>Rodd
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform