Here, for example, I have a PictureBox and I need to render something on it and check if I’m drawing on what is being rendered, if you do in MouseMove then the fact that it is being rendered slows down the drawing process itself which is logical. I am not familiar with the logic of events in C #. How can I do this without losing speed?
1 answer
When an event occurs, a sequential call to handlers that subscribe to the event in a separate thread occurs.
In other words, until one handler runs out, the second will not start.
It turns out that you need to release event handlers as quickly as possible.
You can try to create a separate Task in the event handler and thereby instantly leave it.
- I have an idea to do combings in another stream while MouseMove, but how to get MouseMove from another stream? - Mike Waters
- Delegate to the event? - Mike Waters
|