Ma quella funzione l'hai aggiunta a mano o tramite l'editor di Windows Forms?
Amaro C++, il gusto pieno dell'undefined behavior.
Regole del Forum