How to preload forms

  • Thread starter Thread starter Luc
  • Start date Start date
L

Luc

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!
 
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
 
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??
 
Amar said:
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
 
I believe so, yes.

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...
 
Sorry but my English is not very good, i think this can help you...

Displays a preload windows form (with opacity) while running application in the second thread with backgroundworker

http://www.elguille.info/colabora/2009/danicuco_Precarga_WindowsForm_BackGorundWorker.htm

you enjoy?

Danicuco



Lu wrote:

How to preload forms
22-ene-08

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
--
Best regard
Luc

Previous Posts In This Thread:

On martes, 22 de enero de 2008 19:56
Lu wrote:

How to preload forms
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
--
Best regard
Luc

On viernes, 25 de enero de 2008 17:29
Dejan Stanic wrote:

What do you mean by 'preloading'?
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

On s?bado, 26 de enero de 2008 5:39
Dejan Stanic wrote:

Re: How to preload forms
I believe so, yes

LP
Dejan

On mi?rcoles, 06 de febrero de 2008 6:55
Amar wrote:

Re: How to preload forms
On Jan 26, 3:29 am, "Dejan Stanic" <piki.laiks@org -- (swap th
obvious)> wrote

I am facing the same problem
What I want to do is, fill the comboboxes with values and fetch som
data. If I do this on form load, or in the constructor, the for
becomes too sluggish..
Is the only alternative to fire a background thread to do th
fetching, and then invoke the forms thread to fill the combos??

On mi?rcoles, 06 de febrero de 2008 6:55
Amar wrote:

Re: How to preload forms
On Jan 26, 3:39 pm, "Dejan Stanic" <piki.laiks@org -- (swap th
obvious)> wrote

And this actually works except for a catch.
Turn the crossthreadingexception off, do the combo filling and the
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 i
finally going to be executed on the same thread...

EggHeadCafe - Software Developer Portal of Choice
ASP.NET 2.0: Using the Menu Control
http://www.eggheadcafe.com/tutorial...b210-d64f9d7293b6/aspnet-20-using-the-me.aspx
 
Back
Top