jstern81
unread,May 13, 2008, 12:54:58 AM5/13/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
System:
Vista
Visual Studio 2005
C#
My goal is to check periodically for a certain condition which when
true indicates my system-tray application should make itself visible
to the user.
Problem: From my Timer, invoking the BackgroundWorker.RunWorkerAsync,
with an implemented RunWorkerCompleted method which calls Show() on
the application window, throws an InvalidOperationException: 'Cross-
thread operation not valid: Control accessed from a thread other than
the thread it was created on.'
I am able to successfully use the very same code to update a control
within the window, but I can't Show() the window to the user from the
Timer -> BackgroundWorker. Is this not possible with
BackgroundWorker? Should I be approaching this problem differently?
Any help is greatly appreciated.