C
Cliff
I have a Class FWControl defined in FWControl.dll (a .net class
library). It doesn't inherit anything other than Object.
FWControl has an event StatusChanged, which is actually raised in
response to a file changing. The File is being watched with
FileSystemWatcher
I have an application FWMonitor which has a reference to FWControl.dll
and uses the FWControl Class.
The FWmonitor Application Subscribes to the StatusChanged Event.
In the implementation of OnStatusChanged, I have to change some GUI
Objects. (modify their enabled property)
When I do, I get and exception: "cross thread operation not valid"
For the time being I've used CheckForIllegalCrossThreadCalls to turn
off the error.
but i'd really like to know;
a: how to do this properly....I thought this is what events were for!
b: Why is this running in multiple threads anyway. I would have
expected the whole thing to run in a single thread.
Thanks in advance
Cliff Dabbs
library). It doesn't inherit anything other than Object.
FWControl has an event StatusChanged, which is actually raised in
response to a file changing. The File is being watched with
FileSystemWatcher
I have an application FWMonitor which has a reference to FWControl.dll
and uses the FWControl Class.
The FWmonitor Application Subscribes to the StatusChanged Event.
In the implementation of OnStatusChanged, I have to change some GUI
Objects. (modify their enabled property)
When I do, I get and exception: "cross thread operation not valid"
For the time being I've used CheckForIllegalCrossThreadCalls to turn
off the error.
but i'd really like to know;
a: how to do this properly....I thought this is what events were for!
b: Why is this running in multiple threads anyway. I would have
expected the whole thing to run in a single thread.
Thanks in advance
Cliff Dabbs