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 / January 2008

Tip: Looking for answers? Try searching our database.

How to preload forms

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luc - 23 Jan 2008 00:56 GMT
In my application I use an mdi form in which I display several forms,
What is the best way to preload this forms ? during the load event I goto
the database to fill my comboxes....

thx for your quick response!
Signature

Best regards
Luc

Dejan Stanic - 25 Jan 2008 22:29 GMT
What do you mean by 'preloading'?
Do you want to create/instantiate whole forms in background,
or do you just need to create some structures and fetch some data?

LP,
Dejan
Amar - 26 Jan 2008 02:57 GMT
On Jan 26, 3:29 am, "Dejan Stanic" <piki.laiks@org -- (swap the
obvious)> wrote:
> What do you mean by 'preloading'?
> Do you want to create/instantiate whole forms in background,
> or do you just need to create some structures and fetch some data?
>
> LP,
> Dejan

I am facing the same problem.
What I want to do is, fill the comboboxes with values and fetch some
data. If I do this on form load, or in the constructor, the form
becomes too sluggish...
Is the only alternative to fire a background thread to do the
fetching, and then invoke the forms thread to fill the combos??
Dejan Stanic - 26 Jan 2008 10:39 GMT
> Is the only alternative to fire a background thread to do the
> fetching, and then invoke the forms thread to fill the combos??

I believe so, yes.

LP,
Dejan
Amar - 26 Jan 2008 12:51 GMT
On Jan 26, 3:39 pm, "Dejan Stanic" <piki.laiks@org -- (swap the
obvious)> wrote:

> > Is the only alternative to fire a background thread to do the
> > fetching, and then invoke the forms thread to fill the combos??
[quoted text clipped - 3 lines]
> LP,
> Dejan

And this actually works except for a catch..
Turn the crossthreadingexception off, do the combo filling and then
turn it on again.
Also dont invoke, just fill the combo from the other thread.
I know I am cheating.. ...

Else there is actually no difference if you use invoke, cause it is
finally going to be executed on the same thread...

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.