?
Solved

URGENT C# Form Load takes awhile. Show a progress bar while loading

Posted on 2007-11-27
6
Medium Priority
?
5,860 Views
Last Modified: 2012-05-05
I have a form that takes awhile to load becasue it has to unzip a folder parse a file and load that file onto the screen.

The problem is that the screen takes a while to load. Basically giving the user the impression that the screen froze.

So what I was thinking is showing a progress bar that says form loading. How do I go about doing this.
0
Comment
Question by:NewMom2Brandon
[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
  • 2
  • 2
6 Comments
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20361365
inside your parsing function, you can call Application.DoEvents() to avoid freezing
0
 
LVL 2

Author Comment

by:NewMom2Brandon
ID: 20361723
I tried that and it actually did freeze my application.

Its not that the application is freezzing its just that it take a while for the form to load
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20361744
So, just include the progress bar into your form and update it from the parsing function, you have to call DoEvents anyway to allow the progress bar to show advance.
0
 
LVL 2

Accepted Solution

by:
NewMom2Brandon earned 0 total points
ID: 20366624
The best solution was to actually place a backgroundWorker into my form I am loading.
I also added a Status bar, and timer. This allowed my form to load and show the user that something is happening.

http://www.c-sharpcorner.com/UploadFile/LivMic/BGWorker07032007000515AM/BGWorker.aspx
0
 
LVL 1

Expert Comment

by:Vee_Mod
ID: 20391015
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

770 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