I am trying to make updates for two related TextBox es. I will disable events in one, and then send keystrokes using, for example, SendKeys::Send("A"); by first specifying the focus:
texBox2->Focus(); texBox2->KeyDown -= gcnew KeyEventHandler(this, &Form1::texBox2_KeyDown); SendKeys::Send("A"); texBox2->KeyDown += gcnew KeyEventHandler(this, &Form1::texBox2_KeyDown);
It almost works, but it goes completely mentally, instead repeating the character (I donβt see to check which key, because I feverishly burned out the overflow) until I press the control-alt-del button. No other keys work and the mouse freezes. But the task manager miraculously regains my control, I stop nothing and do not kill.
Can anyone advise? The debugger hangs over this statement SendKeys::Send("A"); .
source share