VB.NET 2002/2003 BasicsFor coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.
You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
This is a very simple question from a VB beginner. How do I set up the button property to allow the user to press the Enter key as an alternative to clicking the button to activate the button's Click event procedure? Thanks
Set the “Default” property of the button to True. Then the Enter key will trigger the _Click event of the button. Only one button can be set to be the default button at a time.
If you set the “Cancel” property to True, the button will be clicked if the user hits the Esc key.