Thank you for your sample.
We have tested this here but couldn't reproduce the access violation. We copied and pasted 1, but we don't get an access violation. USample.zip (6.3 KB)
The problem here was messing with the Mask property while the event handling was still in progress.
Solution here is to delay this change after the eventhandling (onChange) is done, by posting a WM_USER-message to the Form and perform the Mask-change when the message is received.