Threaded Splashscreen with Timer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a splashscreen running on a thread from Sub Main and it works OK. It
displays information in a statusbar about queries. I also have a time on the
splashscreen, but the tick event never gets fired. In the Load Event if the
splashscreen I call the timer's Start() event. HOw do I get the tick event
to fire?
 
As Cor mentioned, there are 3 timers available. Since you are looking for
the Tick event, I assume you are using the System.Windows.Forms.Timer timer.
This timer runs on the same thread as the main application thread. As a
result, while you are doing some processing, the main thread is busy doing
that work and is not free to fire the Tick event of the timer. I would
suggest using the System.Timers.Timer timer and watch for the Elapsed event
(similar to the tick event). This timer runs on a different thread than the
main application and hence the thread will be able to fire the Elapsed event
when the timer's interval is completed.

hope that helps..
Imran.
 
Bob,

You saw the answer at the message from Imran, I have nothing to add to that.

Cor

"Bob"
 
Hi Bob,
I have a splashscreen running on a thread from Sub Main and it works OK.
It
displays information in a statusbar about queries. I also have a time on
the
splashscreen, but the tick event never gets fired. In the Load Event if
the
splashscreen I call the timer's Start() event. HOw do I get the tick
event
to fire?

Perhaps one of the examples here:
http://www.gotdotnet.com/community/usersamples/?query=splash

will help you.

Cheers

Arne Janning
 

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

Back
Top