Go Back  Xtreme Visual Basic Talk > Visual Basic .NET (2002/2003/2005/2008, including Express editions) > .NET Interface and Graphics > Showing progress during long load processes


Reply
 
Thread Tools Display Modes
  #1  
Old 05-29-2008, 05:43 AM
phil2005 phil2005 is offline
Centurion
 
Join Date: Dec 2004
Posts: 109
Default Showing progress during long load processes

My app needs to do a lot of processing as an MDI form is loaded - populating combo boxes and listviews for example. I want the form to be shown propertly with something to demonstrate progress (either a progress bar on the form, or on another form).

Currently, at the end of the Load event I start a timer, and do the populating in this, but it doesn't seem very elegant. Is there a "form loaded" event I've missed, or is there another way?
Reply With Quote
  #2  
Old 05-29-2008, 06:57 AM
kmoyle73 kmoyle73 is offline
Regular
 
Join Date: May 2006
Location: North Carolina
Posts: 69
Default

There is an event called Shown that occurs when the form first becomes visible. Maybe you are looking for this?
Reply With Quote
  #3  
Old 05-29-2008, 09:41 AM
phil2005 phil2005 is offline
Centurion
 
Join Date: Dec 2004
Posts: 109
Default Many thanks....

that's what I needed
Reply With Quote
  #4  
Old 05-29-2008, 10:28 AM
AtmaWeapon's Avatar
AtmaWeapon AtmaWeapon is online now
Ultimate Contributor

Forum Leader
* Guru *
 
Join Date: Feb 2004
Location: Austin, TX
Posts: 7,598
Default

You might want to consider asynchronously loading the data, since you indicated you wanted to show progress. I've attached a project that demonstrates this. The child form starts a BackgroundWorker that generates data; while the data is generated, a UserControl is used to display the progress.
Attached Files
File Type: zip MdiBackgroundWorkerDemo.zip (23.3 KB, 10 views)
__________________
.NET Resources
My FAQ threads | Tutor's Corner | Code Library
I would bet money 2/3 of .NET questions are already answered in one of these three places.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:

Powered by liquidweb