Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to speed up pageframe with variable # of pages
Message
From
04/10/1997 21:29:51
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
04/10/1997 13:42:15
Chong Hanwah
Apic Systems Pteltd
Singapore, Singapore
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00053219
Message ID:
00053284
Views:
20
>>>Anyone knows how I can speed up my form?
>>>
>>>I have a one-many form with the 'many' part implemented using pageframe. The maximum no. of pages is 11. At the moment, as the user navigates through the records, I add and remove pages.
>>>
>>>I have a pageframe class with new properties such as npagecnt, npageid. The controls on the pages are passed in as a class while adding page. There are about 15 textboxes, 5 combo boxes and 1 listbox on the control class.
>>>
>>>In my add page function, I do the following:
>>>
>>>PARAMETERS cPageClass, cPageCaption
>>>THIS.npagecnt = THIS.npagecnt + 1
>>>THIS.PAGECOUNT = THIS.npagecnt
>>>THIS.npageid = THIS.npageid + 1
>>>cPage = 'Page'+ALLTRIM(STR(THIS.npagecnt))
>>>THIS.&cPage..CAPTION = cPageCaption
>>>objname = 'Page'+ALLTRIM(STR(THIS.nPageID))
>>>THIS.&cPage..ADDOBJECT(objname,cPageClass)
>>>THIS.&cPage..&objname..visible = .T.
>>>
>>>In my remove page function, my codes are as follow:
>>>
>>>PARAMETERS cPageNo
>>>THIS.Pages(cPageNo).PAGEORDER = THIS.npagecnt
>>>THIS.npagecnt = THIS.npagecnt - 1
>>>THIS.PAGECOUNT = THIS.npagecnt
>>>
>>>Do you think defining page class (with the controls in in) in codes will speed up the form?
>>>
>>>Any other suggestions?
>>
>
>Shih Chau,
>
>I think you may be using too many controls and pages.
>To speed up, u may try to use only ONE page which will change the label and
>hide or display certain part's fields when pages is click!
>
>In this way, the no of controls will reduce efficiently! and memory also!!

The controls class on my pages are all subclasses of a class. The subclasses are at least 90% similar to the parent class. I thought VFP will know how to load and speed up if we are using subclasses. Anyway, I can't see a difference when I use the same controls class.

Anyone knows whether how VFP internally processes the subclasses? Like saving memories by loading the portion that is different from the base class. I would guess so.
Previous
Reply
Map
View

Click here to load this message in the networking platform