Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My vb.net form has many controls. It take too time to load form. Is there any solution to reduce the loading time...
Posted

Create one .INI file and set the control you want to be appear. Better than you put into database.

I have some example that used to develop my project. It's by using configuration file. Which mean something that dynamic (value can be change) data such as Branch Code, Branch ID,Payment Type,Merchant.

[MERCHANT]
SPLITTER=,
;0 - Enable Merchant, 1 - Disable Merchant
MERCH1=0,CU,CREATE USER
MERCH2=0,DU,DELETE USER
MERCH3=0,CJ,CREATE JOB

Then load the value into property that can be use to whole process. Just like that

That's my recommendation. If you want to use this, I will explain how. That's my idea for u :)
 
Share this answer
 
Reduce the number of controls.

If you have so many that it is affecting the load time, then you need to look at it from a users' point of view and start moving some of them out of the main display - there is only soi much information you can take in at one time!

It may be worth looking at what you are doing with those controls - if they are all databound for example, then you need to make sure that you are not making a trip to the DB for every control, or loading information you don't need.
 
Share this answer
 
Comments
dcba1 30-Nov-12 3:43am    
form is ready as per client requirement so that I can't reduce no. of controls on form. No control is bound to the database.. I am searching data from database and displaying that on controls.
OriginalGriff 30-Nov-12 3:47am    
Then you need to look at how you are accessing the data, and how you are displaying that.
Try an experiment: remove the code to load any data at all, and see how fast the form loads then. If it's quick, then it *may* be possible to speed it up. If it is too slow, then you need to look at the PC spec or get the customer to change the form design. (This is one of the reasons I don't develop on top-of-the-range machines: if it is fast enough on my machine, it'll be good on the customers)
dcba1 30-Nov-12 5:39am    
I have tried it by removing code at the loading time.. It is fast...
OriginalGriff 30-Nov-12 5:51am    
Then you need to look at exactly how you are loading the data - it may be that you can optimise the existing code, or perhaps move some of it to a background thread so that the UI loads fast (but the user has to wait for the data).
I can't give you specifics - I don't know what you app does, and don't have access to your code - but the general rules are to make as few trips to the DP as you can, retrieve only the exact data you are interested in, and find out what is slow by using the Stopwatch class. You then have a benchmark to work from. This:
http://www.codeproject.com/Tips/312312/Counting-lines-in-a-string
isn't exactly what you want, but it shows how I measure things when I'm trying to find out what works quickest.
dcba1 30-Nov-12 6:11am    
Leave it. simple question .. how to load data in datagridview with fill method..
means is there any method in adodb to load datagrid faster..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900