That might be the problem.  System.Timers.Timer calls you back on a thread
from the system thread pool.  Of course you're not allowed to do anything to
the UI on such a thread.  If you want to call Show from such a thread, then
what you should be doing is using Control.Invoke to marshal the call back on
to the UI thread first.

Are you doing that?  If not, then I expect that's the problem.

In any case, the timer you want is System.Windows.Forms.Timer.  This has the
very pleasant property that it always calls you back on the UI thread.
(Well, assuming you created it on the UI thread in the first place...)  This
means that you are free to do UI things when it calls you back, and there is
no need to use Control.Invoke first.

So try changing your code to use the Windows Forms timer and see if that
helps.

--
Ian Griffiths
DevelopMentor

----- Original Message -----
From: "Jeff Roberts" <[EMAIL PROTECTED]>

I am using a "System.Timers.Timer" !

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to