Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| 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 March 8th, 2004, 10:22 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: , Kent, United Kingdom.
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hot Keys

Hi

I have put hotkeys into my project and they show with the appropriate letter underlined, however when I press ctrl, alt and that particular letter nothing happens. What I am doing wrong?

Thanks In Advance
Louisa

Reply With Quote
  #2 (permalink)  
Old March 8th, 2004, 11:46 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Louisa,

Are you talking about hot keys assigned by putting an ampersand in the screen name of the control, like a button or menu item? If so, try Alt+Letter. AFAIK, you shouldn't use the Ctrl key, unless you use the Shortcut property of a MenuItem. Some of those shortcuts use the Ctrl key.

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #3 (permalink)  
Old March 9th, 2004, 10:01 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: , Kent, United Kingdom.
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

Yes I am talking about hotkeys where you put an & in front of the letter you want to become hotkeys. How do I assign what keys will activate which action?

Louisa

Reply With Quote
  #4 (permalink)  
Old March 9th, 2004, 10:06 AM
Friend of Wrox
 
Join Date: Sep 2003
Location: , Kent, United Kingdom.
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,

I have tried the alt and the hotkey this works great for the top of the menu for example file, but what about within the menu such as save, as this doesn't work.

Louisa

Reply With Quote
  #5 (permalink)  
Old March 9th, 2004, 10:17 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

For Menu Items, you'll have to assign a Shortcut yourself. Click a Menu Item on the forms designer (make sure you have a Menu Item, not the top-level menu) and then open the Properties dialog. You'll find a Shortcut property that allows you to assign a shortcut like F6 or Ctrl+Shift+W to the menu item. Make sure that ShowShortcut is set to True, so your users are able to see the shortcut.....

I don't think the other "shortcuts", e.g. press Alt+B for a Button with the text &Button are called shortcuts, but rather are called Access Keys (the net effect is the same, though; both allow you to perform an action by pressing keys on your keyboard).

Imar

---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Reply With Quote
  #6 (permalink)  
Old March 9th, 2004, 12:26 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: , Kent, United Kingdom.
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks very much, worked perfectly

Louisa

Reply With Quote
  #7 (permalink)  
Old September 27th, 2004, 09:48 AM
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have assigned hot keys to my application tied to the key down event on a form. However, if there are 40 controls on my form, it's very common that the form does not have focus. Therefore, I can add the same event handler to each control's key down event but that seems extremely tedious. Does anyone have any alternate suggestions?

Ray
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
Using Session...hot to do that? Shuchik Classic ASP Basics 1 August 31st, 2007 01:49 AM
Tool Bar with hot keys venkatraman_gururaj General .NET 0 July 13th, 2006 09:06 AM
hot keys in C++ carl.dufresne@sita.aero C++ Programming 3 January 5th, 2006 02:28 AM
When to define primary keys and foregin keys? method SQL Server 2000 1 August 26th, 2005 09:14 AM
FAQ: Text editors and hot keys richard.york Beginning PHP 1 September 10th, 2003 06:00 AM



All times are GMT -4. The time now is 09:13 PM.


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