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:
00668241
Vues:
20
There will be performance differences but not what earlier versions of VB had where the overhead of placement was done for all pages instead of only the current page. There are trayed offs for each approach you are deciding on. One option I have done when I needed to swap out information on pages is to place all the objects of a page in a container, then istantiate the one container. It gives you the ability to visually place the controls. Maintenance of the forms is harder because you need to go into your separate container class to change the UI.

>There does seem to be some difference in instantiation. I built two forms, both had the following in common:
>
>1) both were subclassed from the same form class
>2) both had the same tables to open in their data environment
>3) both had a page frame with 5 pages.
>4) both had a grid on the first page
>5) both had 5 command buttons on the bottom of the form
>6) and both had the same number of text boxes with matching labels on the top half of the form.
>
>The difference between the two was that I included grids and extra text boxes on the other pages of one form.
>
>I then added the same code in the load and init methods of the form. The load method stored the result of seconds(). The init method did the same and then showed the difference between it's seconds()'s result and the inits (i.e. the number of seconds that had elapsed between load and init). On my machine there was visually no significance in the time to display the forms but there was consistant time difference between the two. The form with objects on the other pages took slightly longer to instantiate.
>
>The biggest problem showed up on an old Win95 machine. There was a noticeable difference in the amount of time it took for each form to display. The form without the extra objects displayed much quicker and the amount of time calculated in my methods was as much as a second.
>
>I could definitely be overlooking something here; but it does seem like there is some extra overhead with having the extra objects on a page frame even if they're not initially visible.
-----------------------------------------

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