473,503 Members | 1,712 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 1813
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.AccessKey = "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_AccesskeyPressed(keyAscii As Interger)
'example
Call UserControl_Click
End Sub

Private Sub UserControl_Click()
'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...
2
11105
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...
1
2281
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...
3
2835
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...
2
2082
by: Martin Hjärtmyr | last post by:
I have a program that uses Hotkeys! And they works just fine! I use this hotkeylib:...
3
3733
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,...
2
2425
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...
2
5965
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...
0
1253
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...
0
7084
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
7328
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...
0
5578
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,...
1
5013
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...
0
3167
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...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
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...

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.