• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 5864
  • Last Modified:

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

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
NewMom2Brandon
Asked:
NewMom2Brandon
  • 2
  • 2
1 Solution
 
Jaime OlivaresCommented:
inside your parsing function, you can call Application.DoEvents() to avoid freezing
0
 
NewMom2BrandonAuthor Commented:
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
 
Jaime OlivaresCommented:
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
 
NewMom2BrandonAuthor Commented:
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
 
Vee_ModCommented:
Closed, 500 points refunded.
Vee_Mod
Community Support Moderator
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now