Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to preload forms

0 views
Skip to first unread message

Luc

unread,
Jan 22, 2008, 7:56:21 PM1/22/08
to
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 regards
Luc

Dejan Stanic

unread,
Jan 25, 2008, 5:29:57 PM1/25/08
to
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

unread,
Jan 25, 2008, 9:57:41 PM1/25/08
to
On Jan 26, 3:29 am, "Dejan Stanic" <piki.laiks@org -- (swap the

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

unread,
Jan 26, 2008, 5:39:36 AM1/26/08
to
"Amar" <amarjeet...@gmail.com> je napisal v sporocilo
news:0bcc9a20-4225-4eb6...@i29g2000prf.googlegroups.com ...

> 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

unread,
Jan 26, 2008, 7:51:04 AM1/26/08
to
On Jan 26, 3:39 pm, "Dejan Stanic" <piki.laiks@org -- (swap the
obvious)> wrote:
> "Amar" <amarjeetlokha...@gmail.com> je napisal v sporocilonews:0bcc9a20-4225-4eb6...@i29g2000prf.googlegroups.com...

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

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

danieljrodriguezperez

unread,
Nov 13, 2009, 11:51:29 AM11/13/09
to
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

Previous Posts In This Thread:

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

How to preload forms

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 the
obvious)> wrote:

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

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

Re: How to preload forms

EggHeadCafe - Software Developer Portal of Choice
ASP.NET 2.0: Using the Menu Control
http://www.eggheadcafe.com/tutorials/aspnet/5d73eff4-c8f7-4398-b210-d64f9d7293b6/aspnet-20-using-the-me.aspx

0 new messages