473,387 Members | 3,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 2475
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.
"LisaConsult" <li**********@online.nospam> wrote in message
news:0C**********************************@microsof t.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.
"LisaConsult" <li**********@online.nospam> wrote in message
news:0C**********************************@microsof t.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 misunderstanding, 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
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...
3
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...
9
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...
5
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...
0
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
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...
0
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...
3
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()); ...
9
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.