Re: Threads in Visual Basic?



Dag Sunde wrote:
Ray wrote:
Tony Proctor wrote:
That's possible Ray. The not-so-obvious bit is how to share the
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

It's not that much data, it's just coming over a slow WAN link, which

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



Relevant Pages

  • Re: Mobile Development for WM 5 with one main exe controlling mult
    ... I'm trying to convince them with what you said about the load strategy, ... it could be due to the fact that all the loading are done ... App size has nothing ... split the whole program from one exe to multiple. ...
    (microsoft.public.pocketpc.developer)
  • Re: Reprise: Pended IOCtrl + LoadLibrary == Deadlock?
    ... >3) launching msdev.exe from the shell and from within windbg. ... >load (from within msdev) ionwizrd.exe ... When I hit F5 to run my app the following occurs: ...
    (microsoft.public.development.device.drivers)
  • Re: Whose Fish?
    ... That would be much more in line with your Table Oriented Programming ... cart structure/object floating around in the app. ... intuitive way, as it is with a good object model, ... I might load CustomerInfo with read only ID ...
    (comp.object)
  • Re: Reprise: Pended IOCtrl + LoadLibrary == Deadlock?
    ... > and execute!htrace in both devenv.exe and the target app. ... launching msdev.exe from the shell and from within windbg. ... All other cases either result in not being able to run msdev or my app ... itself both when it starts up and when it is trying to load my app. ...
    (microsoft.public.development.device.drivers)
  • Re: Dynamically-created menus and mdi children
    ... I created the new app and it worked. ... my main form is not the first form that opens. ... I open the Main Form and close the Login form. ... Otherwise my main form continues to load and I load ...
    (microsoft.public.dotnet.languages.vb)