Prova ad usare l'evento Validate.
Amaro C++, il gusto pieno dell'undefined behavior.
Regole del Forum