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

Home Posts Topics Members FAQ

Creating a keyboard shortcut on windows form

Hi
What is the best why to create a custom keyboard shortcut (eg alt-a) on a
..Net form using C#?
Thanks

Dec 22 '05 #1
1 4671
Esemi,

You can always create a menu item and then set the Shortcut property to
a key combination which you want the shortcut to be.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Esemi" <Es***@discussi ons.microsoft.c om> wrote in message
news:99******** *************** ***********@mic rosoft.com...
Hi
What is the best why to create a custom keyboard shortcut (eg alt-a) on a
.Net form using C#?
Thanks

Dec 22 '05 #2

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

Similar topics

4
27704
by: The Flyer | last post by:
Hi Sorry for posting this message to so many groups, but I was not sure which group the windows keyboard experts would be reading, so I ventured to post it to all of them. I want to map or create shortcut on the keyboard for Cut/Copy/Paste functions. I can use the regular Control_X, C or V to do the same in Windows XP, but I would rather...
6
12987
by: daFritz | last post by:
Hi! I need to prevent Task-Switching in my App, so I tried to implement a low level keyboard hook in a extra class. But it seems that the Parameters are not passed correctly to my Hook function. Similar Examples in VB .NET work correctly. Heres the Source Code: using System; using System.Runtime.InteropServices;
5
8613
by: bob lambert | last post by:
Hi, I have a vb .net std 2002 windows form app and wanted to use keyboard shortcuts (& in text property input) It shows up on the design view, but when I build (in debug mode) and display the form for use, the characters that are ampersanded do not show up underlined and the keyboard shortcut does not work ?
3
2008
by: nhmark64 | last post by:
Hi, Sometimes when I am cutting and pasting it looks like the keyboard layout changes; for instance ',' and 'w' are interchanged. Is there a better way to fix this problem than exiting then restarting the IDE? Thanks, Mark
3
8967
by: ommail | last post by:
I have two RichTextBox controls on a form, and single ContextMenuStrip control which serves for both textboxes. I need to determine which RichTextBox control invokes an event handler in ContextMenuStrip. So I use that code: private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
3
2283
by: Rotsey | last post by:
Hi, I have windows app that I have a windows keyboard shortcut for. I am finding that the shortcut is not all that responsive. ie it takes sometimes more than a 5 seconds for form to appear or longer. Is this something I can improve or is it the windows
1
3712
by: fiazbfs | last post by:
I would like to know the Keyboard Shortcuts for "Apply Filter", "Filter by Form", "Filter by Selection" in datasheet / form view. It is very annoying to just be able to use the mouse for this process. Keyboard shortcut will certainly make the work faster. If there are no shortcuts available, how can I create one. Also, I want to make sure...
8
5286
by: BD | last post by:
How can I duplicate the behavior of the operating system shortcut keys in my application? For example, my windows form has 5 controls (textboxes), the operating system will pickup which control has the focus and handle ctrl-c, ctrl-v, or any other shortcuts. I have the same shortcuts working in my app, but have not determined how to find...
1
4150
by: scudsong | last post by:
I override ProcessCmdKey() in my MDI parent form class and have some keyboard shortcut calling method in same class. But I wish to make these hotkeys working in parent/child form and other form. The case now is when focus on the other form(regular form, not MDI), ProcessCmdKey() doesn't capture keyboard anymore. Which class should I put...
0
7700
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
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
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
7676
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
7974
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
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
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
3653
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
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.