Form loading is slow 
Author Message
 Form loading is slow

In the event of the form load, I put a lot of code as verifying the
queries, if not there I create them, initialized the controls, etc.  but
with all of that code, it is very slow to load forms.

Where could I put that code and have my forms load rapidly?

I don't want to keep the form only hide.  I want to unload and load form
when necessary.

--
Nathalie Turgeon




Fri, 16 Jun 2000 03:00:00 GMT  
 Form loading is slow

Quote:

> In the event of the form load, I put a lot of code as verifying the
> queries, if not there I create them, initialized the controls, etc.  but
> with all of that code, it is very slow to load forms.

> Where could I put that code and have my forms load rapidly?

> I don't want to keep the form only hide.  I want to unload and load form
> when necessary.

> --
> Nathalie Turgeon



Hi,

i am not sure, but i would place some code in functions. This functions
i would place in several external modules.

Maybe this is the solution.

Uwe



Sat, 17 Jun 2000 03:00:00 GMT  
 Form loading is slow

A few things to consider:

1) Show the form _before_ you start all this (with Me.Show, or similar).
That'll get the form up quickly, and give the user something to look at
while the form is initializing.

2) If this isn't a golden rule of programming, it should be: always put off
until later what you don't _have_ to do now. For instance, does every last
one of those queries have to be run _before_ the user can use the form? Or
are some loading data that's less likely to be used, and are candidates for
being run on demand: i.e., only when the user does something that
specifically requires loading the data? Don't run the query until you must.

3) In a similar vein, perhaps there's only one or two queries that need be
run before the user can start using the form (e.g., a query to load a
selection list). Run that query, display the form, and then run the others
in the background. Easier said than done, but worth considering.

4) How likely is it that a query will _not_ exist? Unless it's very likely,
I'd be inclined to _assume_ it exists, and use an error trap to handle the
case where it doesn't. If the query can be expected to exist 95% of the
times the form is loaded (over the lifetime of the program), you'll save
yourself one time-consuming step 95% of the time by this method.

Quote:

>In the event of the form load, I put a lot of code as verifying the
>queries, if not there I create them, initialized the controls, etc.  but
>with all of that code, it is very slow to load forms.

>Where could I put that code and have my forms load rapidly?

>I don't want to keep the form only hide.  I want to unload and load form
>when necessary.

>--
>Nathalie Turgeon





Sat, 17 Jun 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Slow Outlook Custom Form Loading & Executing

2. Slow loading form

3. Slow Form Load !

4. Form load is slow

5. VB6 Data Form loading too slow?

6. VB6 Data Form loading too slow?

7. eVB Masters - Slow Load with Control Intensive Form

8. Why am I so Slow

9. Slow, slow, slow search on VB6, ADO and SS7

10. VB4 is slow..slow....slow

11. Insert into SQL Server slow, slow, slow...

12. load another form form one form

 

 
Powered by phpBB® Forum Software