The documentation specifies that the WaitForChanged method should not be
called on the UI thread or it will freeze the UI thread. So, I have
started it in a thread seperate from the main form's thread. The
WaitForChanged event will wait infinitely until a file is created, but
the user needs to be able to stop the application from running and so I
need to stop that thread waiting for the file. I have hookde up a
ManualResetEvent to the method calling WaitForChanged, but it only
checks if the thread has been stopped after the call to WaitForChanged
returns. How can I force the WaitForChanged method to come back before
a file is found?
thanks!