Well, you probably have plenty of spare CPU left and 100ms is an eternity, but spinning that lower loop unconditionally uses resources even if they are not needed. For the "cursor move" event, make sure to limit the event queue to 1 and don't lock the front panel until the event completes.
thank you for the advice. However, with the mouse event, my curves are disappearing unexpectedly... no clue of what is happening.
You have an enum conflict. Fix that first.
I'm sorry, my mistake, in the zipped directory I updated only the main and not the State file...
here it is...