Solved

VB.Net Form take time to load.

Posted on 2012-04-08
3
201 Views
Last Modified: 2012-04-13
I have form which is attached to menu it takes time 2 min to load,i want reduce this time.How can i do that? i am attached my code file frmdataentry.vb for reference.so pls give me some suggestion for reduce the time.
frmDataEntry.vb
0
Comment
Question by:vpkamble_400
3 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
Comment Utility
it looks as if you are doing too much in the form load event.
Just add backgroundworker in your form and let it process your on load tasks in background, this will enable your form to load immediately as it is called..

here is example of bgworker:-
http://www.dotnetperls.com/backgroundworker-vbnet

just one catch here, while the bgworker is processing, you will not be able to update any UI Control as bgworker uses ThreadPool thread to process in
background and you cannot access ui controls in another thread.

So keep that in mind...
0
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
One quick fix is to use the Shown event instead of Load event so your form appears immediately even though it may be not responding due to the work its doing.
0
 

Author Closing Comment

by:vpkamble_400
Comment Utility
I GOT MY SOLUATION THANKS DEAR....
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now