Solved

VB.Net Form take time to load.

Posted on 2012-04-08
3
218 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 500 total points
ID: 37821564
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
ID: 37832859
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
ID: 37843753
I GOT MY SOLUATION THANKS DEAR....
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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