Hi Praveen,
The problem is likely that you're showing the form on a worker thread instead of your application's UI thread. Try this:
where
Good luck!
The problem is likely that you're showing the form on a worker thread instead of your application's UI thread. Try this:
FileSystemWatcher _fileWatcher = new System.IO.FileSystemWatcher(); vde.AddHostObject("_fileWatcher", _fileWatcher); // ... _fileWatcher.SynchronizingObject = someForm; // <-- ADD THIS LINE
someForm
is your application's main form or some other form that's active before you run your script.Good luck!