473,569 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Substituting Ctrl for Alt keys

We upgraded a vb project to vb.net and added many enhancements. The old
project was not an MDI and used buttons for functions like adding a record
(Alt A), deleteing a record etc. This is a data entry app so user speed is
of utmost importance. Now we have an MDI interface, but the users would like
to keep their Alt keystrokes because of speed/retraining issues. We also
would like to introduce Ctrl keystrokes with the hopes of phasing out the
Alt. We'd like a solution that doesn't replicate code. Is there a way to
capture the Alt-A in a form and change it to a Ctrl-A that the MDI parent
would then pick up? For other reasons, we do have KeyPreview turned on in
the child forms. Any thoughts? Thanks.
Dec 1 '05 #1
5 2484
Lisa:

If you have not looked at overriding the ProcessCmdKey method, this may be
one alternative to capturing the key strokes on your form. The following KB
article gives more information about capturing key strokes in VB.NET. I
don't know if this will meet your requirements, however, I thought I would
pass it along.

http://support.microsoft.com/default...b;en-us;320583

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"LisaConsul t" <li**********@o nline.nospam> wrote in message
news:0C******** *************** ***********@mic rosoft.com...
We upgraded a vb project to vb.net and added many enhancements. The old
project was not an MDI and used buttons for functions like adding a record
(Alt A), deleteing a record etc. This is a data entry app so user speed is
of utmost importance. Now we have an MDI interface, but the users would
like
to keep their Alt keystrokes because of speed/retraining issues. We also
would like to introduce Ctrl keystrokes with the hopes of phasing out the
Alt. We'd like a solution that doesn't replicate code. Is there a way to
capture the Alt-A in a form and change it to a Ctrl-A that the MDI parent
would then pick up? For other reasons, we do have KeyPreview turned on in
the child forms. Any thoughts? Thanks.
Dec 1 '05 #2
Thank you for your reference; however, if I implement this solution, does
that mean that I would need to create a Control class for every type of
control on my form so that Alt A could be captured from anywhere on the form?
I have comboboxes, text boxes, list boxes, etc on my form. No matter where
the user is located, I would like Alt A to behave as Ctrl A does. Thanks

"David Lloyd" wrote:
Lisa:

If you have not looked at overriding the ProcessCmdKey method, this may be
one alternative to capturing the key strokes on your form. The following KB
article gives more information about capturing key strokes in VB.NET. I
don't know if this will meet your requirements, however, I thought I would
pass it along.

http://support.microsoft.com/default...b;en-us;320583

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.
"LisaConsul t" <li**********@o nline.nospam> wrote in message
news:0C******** *************** ***********@mic rosoft.com...
We upgraded a vb project to vb.net and added many enhancements. The old
project was not an MDI and used buttons for functions like adding a record
(Alt A), deleteing a record etc. This is a data entry app so user speed is
of utmost importance. Now we have an MDI interface, but the users would
like
to keep their Alt keystrokes because of speed/retraining issues. We also
would like to introduce Ctrl keystrokes with the hopes of phasing out the
Alt. We'd like a solution that doesn't replicate code. Is there a way to
capture the Alt-A in a form and change it to a Ctrl-A that the MDI parent
would then pick up? For other reasons, we do have KeyPreview turned on in
the child forms. Any thoughts? Thanks.

Dec 8 '05 #3
Hi

Have you tried the KeyPreview which will help you capture the key messages
in the function?
Did that works for you?
If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 8 '05 #4
Thanks for your message. We have tried implementing the Alt using
KeyPreview. We can do it successfully, however we have the problem with the
"beep" (which seems to be widely known) after the use of the Alt key. Plus
we actually have 2 MDI child forms, they can press ALT A in either and it
should perform an Add in the one form. This results in duplicate code, not
to mention "sloppy code". Any thoughts?

""Peter Huang" [MSFT]" wrote:
Hi

Have you tried the KeyPreview which will help you capture the key messages
in the function?
Did that works for you?
If you still have any concern, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 8 '05 #5
Hi

Do you mean when you click the Alt there is a Beep occur,based on my test,
it seems there is no such sound.
If I have any misunderstandin g, please feel free to post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 9 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
12167
by: Mike Maxwell | last post by:
<vent> I see there has been traffic over the years on this gripe, so just let me vent my frustration, and add another reason why 'exit' (or possibly exit() or quit() or halt() or some such) should exit Python, rather than giving the ridiculous msg Use Ctrl-D (i.e. EOF) to exit. The additional reason is that God intended Ctrl-D to be...
3
3137
by: Mark | last post by:
Any Visual C++ source code available for disabling the following keys in windows 2000. Alt + Ctrl + Del Ctrl + Esc Windows Key to Remove task bar Function keys (or Alt + Function keys or Ctrl + function keys) disabling the Right mouse
9
3017
by: Miky | last post by:
Hi, I need to send Ctrl-PgUp (or Ctrl-PgDown) to the active application but when I use SendKeys.Send("^{PGUP}"), the program understands it as just PageUp. How may I solve it? Thanks in advance, LDV-ME.
5
27296
by: Sharon | last post by:
I’m using the DataGrid control. The DataGrid allow select all by clicking on CTRL+A keys. I need to catch this keys event, so I tried using the KeyDown event, but only when the CTRL is pressed I get the event, but if the A key is pressed while the CTRL is pressed – The event is not fired to my KeyDown handler. How do I get the event for...
0
2640
by: thirunavukarasukm | last post by:
Hai... How to Usercontrols with Shortcut Keys... I am creating one windows apllication.. the apllication contain many form.. in one form i am used one usercontrol(parent control)..
0
1310
by: Andrus | last post by:
MDI WinForms 2 application. I need that Ctrl+F1 cycles through windows like Ctrl+Tab and Ctrl+Tab is redefined. I overrided MDI child form OnKeypress method but Ctrl+F1 press is ignored. For unknown reason base.ProcessCmdKey calls method itself. How to fix ? Andrus.
0
1157
by: Gouri.Mahajan7 | last post by:
Hello, I have hosted the windows user control (which has one richtextbox) on web page. When I type the keys such as Ctrl+O on it the open window pops up and the control (i.e. richtextbox) is not receiving that character. Same with some other shortcut keys such as Ctrl+P, Ctrl+A and so on. Can anybody please give me the solution for it.??...
3
9370
by: Blip | last post by:
Hello - I'm trying to wite these control characters to the serial port w/o success. I've tried sp.Write((Keys.ControlKey & Keys.X).ToString()); sp.Write((Keys.Control & Keys.X).ToString()); char temp = { Convert.ToChar(Keys.Control), Convert.ToChar(Keys.X) };
9
3059
by: timw.google | last post by:
Is there a way to disable ctrl-P (print window) in IDLE? I'm editing some python code in IDLE and I keep hitting this by mistake from my years of emacs editing. Thanks in advance.
0
7694
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7609
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8118
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7666
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.