Mar 7, 2003 #1 RLMuller Programmer Joined Mar 7, 2003 Messages 15 Location US When I add buttons to a dialog in VC++, I can designate one as the default which will receive a click message when Return is pressed on any control. Where's its counterpart in C# forms?
When I add buttons to a dialog in VC++, I can designate one as the default which will receive a click message when Return is pressed on any control. Where's its counterpart in C# forms?
Mar 8, 2003 2 #2 chiph Programmer Joined Jun 9, 1999 Messages 9,878 Location US There's a property on the form called "AcceptButton". Set it to the button you want to be the default. You can also assign a button to the "CancelButton" property, which does what you might expect ;-) Chip H. Upvote 0 Downvote
There's a property on the form called "AcceptButton". Set it to the button you want to be the default. You can also assign a button to the "CancelButton" property, which does what you might expect ;-) Chip H.
Mar 14, 2003 Thread starter #3 RLMuller Programmer Joined Mar 7, 2003 Messages 15 Location US Chip, Thanks for your help. You were right on the mark, of course. Regards, Richard Upvote 0 Downvote