473,322 Members | 1,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

"Preload" Forms for speed?

Hi!
Is there a way to "preload" a form using a thread or something else so that
my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading
of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is
then displayed. form C would then begin preloading...and so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott


Nov 20 '05 #1
4 9864
Scott,

Yeah you can pre-load forms (after all they are classes). However, I don't
know how much of a speed increase you'll get (never tested it).

second off all, I am not sure on the Compact Framework as I have never used
that before. What you may want to do is looking up the
System.Threading.Thread class on your help cd and see if its supported byt
he compact framework, or find something that is.

Hope it helps,
CJ
"Scott Johnson" <sjohnson_at_softaltern_dot_comDIESPAM> wrote in message
news:vv************@corp.supernews.com...
Hi!
Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is then displayed. form C would then begin preloading...and so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott

Nov 20 '05 #2
At the loading of the main for, declare and initialize an instance of each
form you want either within the main form or create a class with a shared
property for each form. - this will slow loading up but you'll have them all
in memory. Then you can make the forms visible as necessary depending on
what the user wants to do. If you bind them to the main form, you'll have
limited access to everything from the subsequent forms, so you'll probably
want to use a module or create the forms as shard properties of a class.

This link may also be of help...in the CF, you need to squeeze out every lit
bit of efficiency you can
http://msdn.microsoft.com/library/de...rmloadperf.asp

HTH,

Bill
"Scott Johnson" <sjohnson_at_softaltern_dot_comDIESPAM> wrote in message
news:vv************@corp.supernews.com...
Hi!
Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is then displayed. form C would then begin preloading...and so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott

Nov 20 '05 #3
My experiences with "speeding up" forms has taught me to
think like a magician. After all, if the
user "perceives" that a form is loading quickly, or
is "responsive" than it doesn't really matter if it
really is taking 5 seconds to initialize. One trick I
use is "amortizing" the long operations. That is, if it
takes 20 seconds to get a result from a database query,
but, you don't need to display everything from the query,
then break up the query into smaller chunks and display
each chunk as it becomes available. So if it takes 3
seconds to get your first result, then 7 seconds for the
second result and then 10 seconds for your final result,
if you start by displaying the first result in 3 seconds
your gui will seem faster (even though 3 + 7 + 10 = the
original 20 seconds--the user only had to wait 3 seconds
for the gui to display a result). It's all "smoke and
mirrors". When it comes to initializing multiple windows
(or tabs) you can "spread out the pain" by starting the
initialization of the longer running operations first.
Using multiple threads can help with the "amortization"
of the initialization of your multiple windows (or tabs)
but you must take the extra precaution of "synchronizing"
the various threads so that your "main window" thread
doesn't display a partially initialized view. You must
also handle the case where your main thread gets
terminated before the "secondary" threads get an
opportunity to complete. After all, you don't want to
write to a window that has been closed!
-----Original Message-----
Hi!
Is there a way to "preload" a form using a thread or something else so thatmy user doesn't have to wait 5 seconds (initializing time) between forms?Some of these forms have tab strips with lots of controls and databasequeries on them and I would like to try to have some (all) of the preloadingof the next form and controls done in the background while a user is stillentering data.

(For example, my user visits screen A then B then C. While the user isstill viewing/entering data on screen A, I would like form B to preload inthe background. The user clicks "next" or whatever on form A and form B isthen displayed. form C would then begin preloading...and so on.)
Does anyone have any suggestions or advice on what I could do to increasespeed between forms? Is my form flow plan OK? BTW - I'm using VB.NET onCompact Framework, but I'll gladly accept *any* advice and direction.
Thanks!
--Scott


.

Nov 20 '05 #4
Thanks for the replies! I'll give em a try.
"Scott Johnson" <sjohnson_at_softaltern_dot_comDIESPAM> wrote in message
news:vv************@corp.supernews.com...
Hi!
Is there a way to "preload" a form using a thread or something else so that my user doesn't have to wait 5 seconds (initializing time) between forms?
Some of these forms have tab strips with lots of controls and database
queries on them and I would like to try to have some(all) of the preloading of the next form and controls done in the background while a user is still
entering data.

(For example, my user visits screen A then B then C. While the user is
still viewing/entering data on screen A, I would like form B to preload in
the background. The user clicks "next" or whatever on form A and form B is then displayed. form C would then begin preloading...and so on.)

Does anyone have any suggestions or advice on what I could do to increase
speed between forms? Is my form flow plan OK? BTW - I'm using VB.NET on
Compact Framework, but I'll gladly accept *any* advice and direction.

Thanks!
--Scott

Nov 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bob | last post by:
I usually use some "pre-load" code in my pages to preload graphics that will be swapped. But, I'm thinking that rather than the long, repetitive, once, for each graphic hardcoded stuff like this: ...
1
by: Stacey | last post by:
Hi, I'm hoping for a bit of advise-- I have a (relatively, from the point-of-view of this dilettante) complex script that attempts to preload certain images in order to trigger one of a series of...
2
by: ChInKPoInt [No MCSD] | last post by:
1. Is there anyway to preload password? Text attribute doesn't work <asp:TextBox ID="Pass" TextMode="Password" Runat="server" Text="Hello"> 2. In the same form, if other elements such as...
1
by: mmcc128 | last post by:
Currently using the "document.images" to "preload" images - not for future pages, but for the page being loaded. I got it from http://www.dynamicdrive.com/dynamicindex4/imagetooltip.htm Its a...
1
by: booniraj | last post by:
Hello, i wanted to disply preload on dtml page.. can you help me in this...? cheers Rajeev
26
by: Jake Barnes | last post by:
I did a search on the newsgroup comp.lang.javascript. I was searching for "how to play a sound with Javascript". I'm somewhat suprised that the majority of entries are from the 1990s, and there are...
4
by: Robert Cramer | last post by:
I am needing to create a sort of "plug-in architecture" whereby different Web sites I maintain on the same server have slightly different functionality. Some Web sites will need to use the...
4
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.