Solved

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

Posted on 2007-11-27
6
5,859 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

689 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