Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / August 2005

Tip: Looking for answers? Try searching our database.

Help with multiple forms functionality

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Cosmas - 15 Aug 2005 22:06 GMT
We have a unique situation where we need to speed up the activation of our
MAIN form.  We have put a splash page before the main shows up and we
pre-load most of our stuff  (user profiles).  Then we bring up the MAIN
form, but we need to continue loading our other stuff (data sets, list).  We
want to do while inside the SPLASH, but minimize it and let the MAIN form
come up as fast and quickly as possible.  At this point, we'll HIDE the
SPLASH page and just continue loading items in it.  Does this involve
multi-threading, and if so, where can I read up on this?
Robbe Morris [C# MVP] - 16 Aug 2005 01:50 GMT
I'd search google on:  .NET Forms and threading
There are some good articles out there for just
what you are wanting to do.

Signature

Robbe Morris - 2004/2005 Microsoft MVP C#

Earn money answering .NET Framework
messageboard posts at EggHeadCafe.com.
http://www.eggheadcafe.com/forums/merit.asp

> We have a unique situation where we need to speed up the activation of our
> MAIN form.  We have put a splash page before the main shows up and we
[quoted text clipped - 4 lines]
> the SPLASH page and just continue loading items in it.  Does this involve
> multi-threading, and if so, where can I read up on this?
Sam Martin - 16 Aug 2005 12:20 GMT
yeah, one way would be to kick off a worker thread in the splash form, then
let control resume to main window. problem is if any "initialisation data" is
required by main form, you'd need to prevent user performing certain actions
until you hear back from thread.
There's a decent article on code project about using a timer to poll the
thread.

HTH
Sam

Signature

TIA
Sam Martin

> I'd search google on:  .NET Forms and threading
> There are some good articles out there for just
[quoted text clipped - 8 lines]
> > the SPLASH page and just continue loading items in it.  Does this involve
> > multi-threading, and if so, where can I read up on this?
Metallikanz! - 16 Aug 2005 18:37 GMT
I would suggest you wrap the method used for loading your settings and stuff in a delegate and call it asynchronously using the BeginInvoke() method. After this you can proceed to load your main form, once that's done you can call the EndInvoke() method which's a blocking call and will return once all your settings are loaded. Asynchronous delegate invocation internally uses threads and stuff (ThreadPool actually) but then you wouldn't have to get your hands dirty doing it while the FW takes care of it for you.

HTH, Metallikanz!

> We have a unique situation where we need to speed up the activation of our
> MAIN form.  We have put a splash page before the main shows up and we
[quoted text clipped - 4 lines]
> SPLASH page and just continue loading items in it.  Does this involve
> multi-threading, and if so, where can I read up on this?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.