i have 2 groupBoxes, both with one TextBox and one Button.
When i am in groupBox1 and write something in textBox1 and i Press the Enter Button, the Button in groupBox1 should be pushed, same Thing when i am in groupBox2 and write something there in textBox2.
Something like
if (Focus is on groupbox1 == true)
this.AcceptButton = button1;
else if(Focus is on groupbox2 == true)
this.AcceptButton = button2;
Use the enter event for toggling the focus