0

In the following form, I want the AcceptButton to be OK button, but although I set the property to the Form that OK button is the accept button, the actual result is Test button.

How to fix it?

enter image description here

French Boy
  • 1,471
  • 3
  • 18
  • 23
  • Debugging code from a screenshot is a questionable request. However, the AcceptButton is drawn with a blue border in the designer. Your OK button isn't blue, the Test button is. Post code that actually reproduces the problem. – Hans Passant Sep 25 '11 at 14:56
  • @HansPassant: I know that from the screenshot the Test button seems to be the AcceptButton, but when I select another tab (doesn't have buttons) in the TabControl, even in the Design Time, the OK button gets this blue border – French Boy Sep 25 '11 at 15:17

1 Answers1

0

Earlier i got this kind of problem, but got solved easily. It is very much possible that Test button TabIndex is less than that of OK button. Just make it reverse. It should work. At least it worked for me. If not, just check the TabControl TabIndex, it should also be greate than your OK button. Hope it helps.

Sandy
  • 11,332
  • 27
  • 76
  • 122