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...