Re: Threads in Visual Basic?
- From: Ray <ray@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 26 Apr 2007 09:52:36 -0500
Dag Sunde wrote:
Ray wrote:Tony Proctor wrote:That's possible Ray. The not-so-obvious bit is how to share theIt's not that much data, it's just coming over a slow WAN link, which
loaded data later. As I said, the threads are independent in almost
every way, and share no data by default. If you were to pass the
resulting Recordset via a COM call between threads (or processes)
then it could also take a long time. Do you know why the database loading is so slow? How much data are
you talking about?
Tony Proctor
I'm just looking for an example or two of how to do a "background"
process in VB so the user could start to log in to the app while the
data continues to load.
Instead of making them start at a splash screen or hourglass for a
minute, I'd like the data to load in the background while they log in.
This is quite possible with an activeX exe (out-of-process) server that
loads the data, and raises an event when done.
Instance it "withevents", and your app will be notified when data is
available.
(If I remember correctly, the "CoffeeTimer" example in the VB manual
show an example of this).
If you can't grok it, post a note here, and I'll whip something together
for you... (but give it a try first... (deadlines haunt me these days)).
The best I could think of would be to use a timer and a status flag to
make sure the data load only runs once, but then I still have a timer
running every x seconds doing nothing other than going "yup, already
ran..."
That is easily fixed by setting Timer1.Enabled = False once you're done.
much thanks for the pointers... I learn something new every day. :)
.
- References:
- Threads in Visual Basic?
- From: SpreadTooThin
- Re: Threads in Visual Basic?
- From: Tony Proctor
- Re: Threads in Visual Basic?
- From: Ray
- Re: Threads in Visual Basic?
- From: Tony Proctor
- Re: Threads in Visual Basic?
- From: Ray
- Re: Threads in Visual Basic?
- From: Dag Sunde
- Threads in Visual Basic?
- Prev by Date: How to do clickable image with overdraw and data storage
- Next by Date: Re: Placing a command button on the desktop
- Previous by thread: Re: Threads in Visual Basic?
- Next by thread: Scaling a picture (i.e. Bitmap or JPG) question...
- Index(es):
Relevant Pages
|