Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 2nd, 2004, 08:57 AM
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Button shortcuts invoked without Alt

I have a fairly complex .NET form in which one UserControl contains some buttons and another UserControl. The inner user control accepts all keyboard input (IsInputKey is overridden to return true always). The buttons support keyboard shorcuts (for example the Skip button's text is "&Skip" to make Alt-S a shortcut for clicking the button).

However, when the inner control has focus, typing a plain "s" invokes the Skip button function instead of entering an "s" into the text of my control.

A breakpoint indicates that the skip button function is being invoked directly from .NET framework code. My IsInputKey function is being called as expected.

How can I prevent this behavior?

 
Old September 2nd, 2004, 11:47 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

You could always "cheat" and change the caption of the button on the textbox's On Got Focus event:

Me.cmdSkip.Caption = "Skip"

then on the textbox's AfterUpdate or On Lost Focus event:

Me.cmdSkip.Caption = "&Skip"

Not elegant, but it may work.


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division





Similar Threads
Thread Thread Starter Forum Replies Last Post
Keyboard Shortcuts Brian Fuller BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 1 November 4th, 2006 01:41 PM
Delete shortcuts Aiel VB How-To 0 March 13th, 2006 02:43 PM
Query Analyzer Shortcuts ioates SQL Server 2000 2 February 6th, 2004 05:22 AM
Keyboard Shortcuts rajanikrishna Linux 1 January 30th, 2004 07:11 AM
Display text onmouseover of radio button(ALT?) savoym HTML Code Clinic 1 September 16th, 2003 11:27 AM





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