Best way to check things in background in MDI window

T

Tom

I have an MDI application in VB.NET. The main MDI window has a status
bar, and menu bar. Child MDI windows are opened via the menu on the
main MDI window.

Now, what I want to do is add code to the main MDI window so that,
every 'xxx' amount of minutes, it goes out and checks a database for
some information. Based on that info, it will update some panels on the
status bar. What is the best way to accomplish this, while still
leaving the MDI child windows running at peak efficiency? I know I
could just drop a timer onto the main MDI window, and set that to the
appropriate number of seconds; however, I don't know what effect
(performance wise) that would have on the other child MDI window
processing... Would it be better to use a delegate, or thread for this?
Which way would be the most efficient? Or is the easier way (i.e. a
timer) just a good?

Thanks.

Chimp (Tom)
--
 
M

Miro

I would assume a Time is easier. ( i am unsure what a delegate is ( still
new to vb ),
but Timer vs Thread, Timer wins in my opinion in this case )

You still need to check ur data every so many minutes - a timer does that
for you

A timer runs in its own thread,

So basically by you creating your own thread and have its own "internal
timer" somehow to check
your database every so many minutes - you have just reprogrammed the timer.

M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top