I am trying to make updates to two linked TextBox
es. I disable events in one and then send keystrokes using eg SendKeys::Send("A");
having first given it 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 goes totally mental instead repeating the character (I daren't look to check which exact key because I'm frantically firefighting an overflow) until I press control-alt-del. No other keys have any effect and the mouse freezes up. But task manager miraculously restores my control, I don't stop or kill anything from it.
Can anyone advise? The debugger hangs on that SendKeys::Send("A");
statement.