Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Visual Basic 2005 with .NET 3.0 Programmer's Reference ISBN: 978-0-470-13705-5
This is the forum to discuss the Wrox book Visual Basic 2005 with .NET 3.0 Programmer's Reference by Rod Stephens; ISBN: 9780470137055
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Visual Basic 2005 with .NET 3.0 Programmer's Reference ISBN: 978-0-470-13705-5 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 Display Modes
  #1 (permalink)  
Old February 16th, 2008, 06:32 AM
Authorized User
Points: 88, Level: 1
Points: 88, Level: 1 Points: 88, Level: 1 Points: 88, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to provide shortcut keys for controls like tex

Hi all,

I need to provide shortcut keys for controls like text box and buttons etc...
That is i dont want to go for tab space or mouse click for particular controls..
By having shortcut keys i need to go for specified controls(textbox,button)...

Is there any way to provide shortcut keys for controls.....or built in property values.....


could any anyone help me out of this query...:(
Reply With Quote
  #2 (permalink)  
Old February 16th, 2008, 11:24 AM
Rod Stephens's Avatar
Wrox Author
Points: 2,999, Level: 22
Points: 2,999, Level: 22 Points: 2,999, Level: 22 Points: 2,999, Level: 22
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
Posts: 601
Thanks: 1
Thanked 84 Times in 83 Posts
Default

Technically shortcut keys are like Ctrl-S and they immediately invoke a function. What you probably want are access keys. These are things like Alt-F to open the File menu.

To use an access key to move to a control, give its caption an underlined character by putting an & in front of the character that you want to be the access key. For a Go button, set the Text property to "&Go" to make the G underlined. Now the user can press Alt-G to fire the button.

For controls such as TextBoxes, which don't have captions, put a Label in front of the TextBox *in the tab order* and give it an access key. When the user presses the access key, focus moves to the Label, but the Label cannot have focus so focus moves to the next control in the tab order: the TextBox. For a Last Name text box, you might make the Label say "&First Name" so the user can press Alt-F to move to the text box.

Rod

Rod Stephens, Visual Basic MVP
RodStephens@vb-helper.com

*** New Book ***
"Visual Basic 2008 Programmer's Reference"

Sign up for the free VB Helper Newsletters at http://www.vb-helper.com/newsletter.html
Reply With Quote
Reply


Thread Tools
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
shortcut keys and pop up dipankar.aich Windows Presentation Foundation 0 April 5th, 2007 08:43 AM
use Shortcut keys slokhande C# 1 July 21st, 2006 10:45 AM
Shortcut keys! Dharam80 Access 2 August 18th, 2005 09:23 AM
making Shortcut keys melvik C# 6 April 9th, 2005 12:48 PM
Shortcut keys DARSIN General .NET 1 November 22nd, 2004 10:29 AM



All times are GMT -4. The time now is 09:57 AM.


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