I have a few textboxes on my winform. I have a few buttons on it too. Now when I am typing on one such textbox and clicks a button, then the input focus is lost from the tex
In your button click event handler(s), explicitly set focus to some other control. Pick any control that you believe would be sensible to gain focus after the button is pressed. For example, set focus to a TextBox, using code like this:
textBox1.Focus();
This will prevent your button from gaining focus when a button is clicked.
In addition, set your button's TabStop property to false.
The other answers suggesting you set the CanFocus property to false won't work because that property is read-only for buttons.