Hello,
I've got a user control that executes a code while starting up. While this code is running, if I cause an event to fire that executes some of the code the startup executes, I get an "attempted to read or write protected memory" exception. I've tried using a lock(this) block, but it doesn't seem to work - should I create an instance of the thread class in the event handler and then run the code with the lock block?
I've got a user control that executes a code while starting up. While this code is running, if I cause an event to fire that executes some of the code the startup executes, I get an "attempted to read or write protected memory" exception. I've tried using a lock(this) block, but it doesn't seem to work - should I create an instance of the thread class in the event handler and then run the code with the lock block?