Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 13th, 2005, 05:30 PM
Authorized User
 
Join Date: Jan 2005
Location: , , .
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default Enter key vs Click Button

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
Reply With Quote
  #2 (permalink)  
Old January 14th, 2005, 12:49 PM
Friend of Wrox
 
Join Date: Nov 2004
Location: Port Orchard, WA, USA.
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter key and double click help... badboy1 ASP.NET 3.5 Basics 0 July 27th, 2008 03:58 AM
enter key should execute button click event MunishBhatia ASP.NET 2.0 Professional 6 November 25th, 2007 10:59 PM
How to set Default Button to "enter Key" madhusrp C# 2 April 10th, 2006 10:42 AM
how to disable enter key for a particular button g_vamsi_krish ASP.NET 1.0 and 1.1 Professional 1 January 19th, 2006 11:22 AM
Button Focus and Enter Key nigel VS.NET 2002/2003 1 August 19th, 2003 07:41 AM



All times are GMT -4. The time now is 05:45 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.