Trying to get a similar effect as the Windows Run dialog. The input box is focused and taking input, and the "OK" button also gets the focused border(but not actually focused). I can’t find a way to set button’s visual style properly…
C# Winform, .net 4.5(higher version is also OK).
The property you’re looking for is
AcceptButton on the form it self.
okButton on the form
AcceptButton property to make it the default action on
You also have a similar action for the
CancelButton that triggers on