473,657 Members | 2,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hotkeys not working

66 New Member
I have a command button user control whose caption is &Clear.
Is it possible to create a hotkey for this button using Alt-C
Mar 12 '08 #1
5 1817
debasisdas
8,127 Recognized Expert Expert
You just press Alt + C the code written for the button will execute.
Mar 12 '08 #2
gobblegob
133 New Member
I have a command button user control whose caption is &Clear.
Is it possible to create a hotkey for this button using Alt-C
&Clear as caption is Alt-C hotkey, so if its not working then you might want
to check the code under that command button to see if thats where you problem is.

GobbleGob.
Mar 12 '08 #3
anuragshrivastava64
66 New Member
You just press Alt + C the code written for the button will execute.
No actually I have made a user control whose caption is '&Clear' to make it look alike normal VB Command Button.

The user control works same as command button except for the shortcut key.
For the user control I have used a picture clip and a lable
Mar 12 '08 #4
debasisdas
8,127 Recognized Expert Expert
Try to handle the KeyDown event of the form and call the code there.
Mar 12 '08 #5
pureenhanoi
175 New Member
No actually I have made a user control whose caption is '&Clear' to make it look alike normal VB Command Button.

The user control works same as command button except for the shortcut key.
For the user control I have used a picture clip and a lable
You made an user control, and it must have the AccessKey. Does this correct?

To set access key for yor control, you must use:
UserControl.Acc essKey = "C" 'or any alphabet you want

You can determine which should be the accesskey by analyze the "Caption" property of this control. The accesskey must be the Character following the Ampersand symbol.

The event will be fired when the accesskey press must be definition in
Private Sub UserControl_Acc esskeyPressed(k eyAscii As Interger)
'example
Call UserControl_Cli ck
End Sub

Private Sub UserControl_Cli ck()
'do smthing else
RaiseEvent Click
End Sub
Mar 13 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
316
by: skumar | last post by:
I need to access the Tabpages by hotkeys "alt+P" in case of "Principals" as one of the Tabpage. Also i need to underline the word "P" in "Principals" so that user is informed about the hotkey.If i use "&" in front of the word "P",it is not underlining the word.It just stays "&" itself. I know we can add this hotkeys to toolbars,buttons and lots of other controls.
2
11116
by: Hasan Ammar | last post by:
Is it possible to set up hotkeys using onkeypress? I know it can be done with the usual alphanumeric keys, but what about function keys? or using ctrl/alt combinations? Does anybody have a tutorial/guide?
1
2297
by: Matthew Wells | last post by:
How do you prevent someone from using Ctrl+, (ctl + comma) or Ctl + . (Ctl + perios) to get to design view. I have all the normal properites turned off (Access special keys, F!!, etc) but nothing seems to stop that one. I tired using AutoKeys to remap it, but I keep getting "Invalid Syntax" or "Invalid keystroke combination". Most of these new hotkeys are really for developers and we should be able to stop end users from using them. I...
3
2851
by: Matthew Wells | last post by:
I'm reposting because an idiot replied without reading the whole message. I've tried autokeys and it isn't working for this combination. Please read on. While in form view, how do you prevent someone from using Ctrl+, (ctl + comma) or Ctl + . (Ctl +period) to get to design view. I have all the normal properites turned off (Access special keys, F11, etc) but nothing seems to stop that one. I tried using AutoKeys to remap it, but I...
2
2090
by: Martin Hjärtmyr | last post by:
I have a program that uses Hotkeys! And they works just fine! I use this hotkeylib: http://www.vbaccelerator.com/home/NET/Code/Libraries/Windows_Messages/Hot_Key_Form/HotKeyForm_zip_HotKeyForm_HotKeyForm_HotKeyFormLib_cs.asp But my hotkeys suddenly stops working when i use this: ShowInTaskbar = false;
3
3737
by: Bernd Eichelsdorf | last post by:
Hi, I would like to add hotkeys to my webapp - it's running on a barcode scanner, that has got a number pad and the keys F1 - F4. I would like to add hotkeys, so that when the user presses F1, the focus is set on form field 1 and so on... Is that possible with javascript, if so, how?
2
2428
by: =?Utf-8?B?SXZvODY=?= | last post by:
Hi, I need ot set hotkeys to my windows application. I want when Word is thea active application and when user press "Ctrl+Alt+T" for example to start my action. I used RegisterHotKey and UnregisterHotKey methods and ovverride WndProc but even when user works with another program different than MS Word and press the shortcut key my action is done. Thanks
2
5972
by: Justin | last post by:
So I have a keyboard hook that I have implemeted into my c# app. I need to not allow any hotkey actions to be performed when my app is opened. I can capture the key events and handle them if I want to. The only problem is that I have fields that require input. Do I have to programmatically add the characters to the input fields when I am handling the event. I don't want these keys sent to the system. But only to my program. Or does...
0
1262
by: Octavius Khan | last post by:
How can I set system hotkey that will only work for specific applications. For example, I have a system tray application that uses hotkeys to perform certain tasks like placing text into a memo field of another application, etc. However, I don't want these hotkeys to be for "every" application. I just want them to work for, let's say Notepad or Wordpad or Internet Explorer. I already know how to set systemwide hotkeys, but I'd like to...
0
8384
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8302
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8820
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8718
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7314
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.