I have a form that takes user input and then let the user get connected to the sql server.
This is happening on button click.But where can I set the property Default button so that the user when clicks enter do the work of that button.
C# – Default button property in winform app
cvisual studiowinforms
Related Topic
- C# – String representation of an Enum
- C# – How to save application settings in a Windows Forms application
- C# – LINQ’s Distinct() on a particular property
- C# – Metadata file ‘.dll’ could not be found
- C# – How to remedy “The breakpoint will not currently be hit. No symbols have been loaded for this document.” warning
- C# – Entity Framework 5 Updating a Record
- Scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found
Best Answer
It is called
AcceptButton
now on the form; set that to the button that will be the default button.Refer to Form.AcceptButton Property