G
Guest
Hello,
There are several 'cross-thread operation not valid' exception postings in
the MSDN discussion groups, but none address my exact situation.
I have authored a .NET component in Visual C# .NET 2003 that is capable of
firing several types of events to notify user of errors, data changes, etc.
The component uses a thread to perform background communications and if there
is an error or data-change fires an event to notify the user. If the
developer that is using my component wishes to display the value form
control's Text property, the 'cross-thread operation not valid' exception is
thrown in VS.NET 2005.
I understand why it is thrown (worker thread not allowed to update UI
thread), but can't find any definitive information on whether this is
addressable from the component standpoint, rather than requiring my
component's user to use delegates and IsInvokeRequired/Invoke to display the
values.
Any feedback or suggestions would be appreciated.
There are several 'cross-thread operation not valid' exception postings in
the MSDN discussion groups, but none address my exact situation.
I have authored a .NET component in Visual C# .NET 2003 that is capable of
firing several types of events to notify user of errors, data changes, etc.
The component uses a thread to perform background communications and if there
is an error or data-change fires an event to notify the user. If the
developer that is using my component wishes to display the value form
control's Text property, the 'cross-thread operation not valid' exception is
thrown in VS.NET 2005.
I understand why it is thrown (worker thread not allowed to update UI
thread), but can't find any definitive information on whether this is
addressable from the component standpoint, rather than requiring my
component's user to use delegates and IsInvokeRequired/Invoke to display the
values.
Any feedback or suggestions would be appreciated.